Add a child widget at the end
The widget to add
Return the child widget at the given index. Returns undefined if no child exists at the index.
Index where to get the child widget
Return the game object that this UI element is attached to. Returns undefined if the element isn't attached to a game object.
Return the widget that contains this widget, for example a border that wraps a check box. Returns undefined if this object has no parent.
Insert a child widget at the given index. Inserts at the end if the index is not valid.
The widget to insert
Index at which to insert the new child
Return whether the widget is currently enabled (see setEnabled).
Return whether the widget is currently visible (see setVisible).
Remove all child widgets
Remove the given child widget
The widget to remove
Remove the child widget at the given index
Index where to remove the child widget
Set whether the widget is enabled. When a widget is disabled, users can't interact with it and it is greyed out. When a widget that contains other widgets (like VerticalBox) is disabled, all its children behave as if disabled, too. By default, widgets are enabled.
Whether to enable the widget.
Set whether the widget is visible. When a widget that contains other widgets (like VerticalBox) is invisible, all its children are invisible, too. The layout of widgets is updated when visibility changes, and invisible widgets are treated as if they don't exist.
Whether the widget is visible.
A widget that contains other widgets and switches between them. Only one child widget is active and visible at a time.