A widget that can contain other widgets at fixed coordinates. A canvas has no size of its own, so you need to explicitly set the widget size in the UIElement and set UIElement.useWidgetSize to false when using it. Widget coordinates are in pixels, at default scale one pixel corresponds to 1 mm in the game world.
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.
Return whether the widget is currently enabled (see setEnabled).
Remove the given child from the canvas
The widget to remove
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.
Update coordinates of a child widget of the canvas. Will not do anything if called with a widget that is not a child of the canvas.
The widget to add
The X coordinate in pixels. Can be undefined to keep the current X coordinate.
The Y coordinate in pixels. Can be undefined to keep the current Y coordinate.
Width of the widget on the canvas in pixels. Can be undefined to keep the current width.
Height of the widget on the canvas in pixels. Can be undefined to keep the current height.