Unreal Engine 4.x Scripting with C++ Cookbook - Second Edition
by John P. Doran, William Sherif, Stephen Whittle
How it works...
Your new editor window won't display itself, and so, at the start of this recipe, it is mentioned that you should have implemented a custom menu or toolbar button or a console command that we can use to trigger the display of our new window.
All of Slate's widgets are usually interacted with in the form of TSharedRef< > or TSharedPtr< >.
The SNew() function returns a TSharedRef that's been templated on the requested widget class.
As we mentioned previously, Slate widgets have a number of functions that they implement, which all return the object that the function was invoked on. This allows for method chaining to be used to configure the object at creation time.
This is what allows for the Slate syntax of <Widget>.Property(Value).Property(Value) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access