Button¶
Deprecated
This element has been deprecated in favor of a Prefab-based solution. See GenericUI_Prefab_Button
.
The element continues to be available for backwards compatibility.
The GenericUI_Element_Button
button element implements a typical button form element. It may be disabled (preventing user interaction) and will fire a contextual event if it is activated while not disabled.
GenericUI_Element_Button Class¶
Inherits from GenericUI_Element
.
Methods¶
IsEnabled¶
Returns whether the button is enabled.
SetEnabled¶
Sets the button's enabled state. Enabled buttons are interactable.
@param enabled boolean
SetText¶
Sets the button's text.
@param text string
@param textY number?
Vertical offset for the text. Use for centering.
SetType¶
Sets the button's visuals.
@param buttonType GenericUI_Element_Button_Type