Widgets
Samples in this section illustrate the use of the GUI-Related classes.
UserInterface#
Creating a user interface and assigning callbacks via C++ API.
SDK Path: <SDK_INSTALLATION>source\samples\Api\Widgets\UserInterface
WidgetCallbacks#
Working with widget callbacks via C++ API.
SDK Path: <SDK_INSTALLATION>source\samples\Api\Widgets\WidgetCallbacks
WidgetCanvas#
Creating a widget canvas via C++ API by using the WidgetCanvas class.
SDK Path: <SDK_INSTALLATION>source\samples\Api\Widgets\WidgetCanvas
WidgetDialog#
Creating widget dialog windows and assigning callbacks via C++ API.
SDK Path: <SDK_INSTALLATION>source\samples\Api\Widgets\WidgetDialog
WidgetExtern#
Creating a custom widget based on WidgetExternBase via C++ API and exporting it to UngineScript.
SDK Path: <SDK_INSTALLATION>source\samples\Api\Widgets\WidgetExtern
WidgetLifetime#
The sample demonstrates managing the widget lifetime in three ways: while the world is loaded (LIFETIME_WORLD), while the window containing the widgets is open (LIFETIME_WINDOW), and while the engine is running (LIFETIME_ENGINE).
The main window named World Lifetime Widgets contains widgets with LIFETIME_WORLD — these widgets are deleted as the world is closed or reloaded. The console will display the corresponding callback messages (world hbox hierarchy removed, world user interface group removed, world button removed).
The widgets in the Window Lifetime Widgets window are deleted as soon as this window is closed. This action is also followed by the corresponding console messages.
The widgets in the Engine Lifetime Widgets window are only deleted on the engine shutdown. The corresponding callback messages can be seen in the log.txt file.
Manual managing (LIFETIME_MANUAL) of the widget lifetime is not illustrated in this sample.
SDK Path: <SDK_INSTALLATION>source\samples\Api\Widgets\WidgetLifetime
WidgetWindow#
Creating a widget window and assigning callbacks on edit line and button press events.
SDK Path: <SDK_INSTALLATION>source\samples\Api\Widgets\WidgetWindow