shown in other instead.
Samples in this section illustrate the use of the GUI-Related classes.
Creating a user interface and assigning callbacks via C++ API.
Working with widget callbacks via C++ API.
Creating a widget canvas via C++ API by using the WidgetCanvas class.
Creating widget dialog windows and assigning callbacks via C++ API.
Creating a custom widget based on WidgetExternBase via C++ API and exporting it to UngineScript.
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.
Creating a widget window and assigning callbacks on edit line and button press events.