v1.2.26 |
Documentation for the Unreal C++ Plugin
|
We have system that allows us to create flexible and clean UI. Most of our UI windows should consist of three components: widget itself (child of UBasicWidget), widget controller (child of AWidgetController) and widget info (child of UBasicWidgetInfo)
The controller is responsible for the back-end part of the widget, such as creating the widget using AWidgetController::InitWidget or closing it using AWidgetController::CloseWidget. It also contains all the main logic of the widget.
This data asset contains various information about the widget that the controller will use. For example, it contains information about the widget's spawn position, whether or not the widget should rotate towards the user, and so on.
Widget is responsible for creating front-end part of widget and can include small amount of logic. You can also use various ready-made components and widgets:
UButtonWidget is a custom widget class that represents a button in a user interface. It provides various functionalities and features to create interactive buttons for UI interactions. It also can highlight button mannually or by OnHintActivated. UButtonListWidget is a custom widget class that represents a list of buttons in a user interface. In this widget you can select only one button. UCheckButtonWidget extends UButtonWidget and allows you to select and deselect button.
UControlsReminderWidget shows different controlls depeding on platform where you launch your app. To create this widget you should pass UControlsReminderWidgetInfo to Init function.