Datatype · Userdata
GuiButton
userdata
Button proxy returned by GuiCategory:add_button. Fires its constructor callback on press.
Fields
| Name | Type | Description |
|---|---|---|
| category | GuiCategory? | Back-reference to the owning category. |
| destroy | () -> () | Marks the button destroyed. |
| is_destroyed | () -> boolean | Returns the destroyed flag. |
| is_visible | () -> boolean | Returns the visibility flag. |
| kind | ControlKind | Always |
| label | string | Current button text. |
| name | string | Alias for |
| on_changed | (callback: () -> ()) -> GuiConnection | Registers an additional press listener. |
| set_label | (text: string) -> () | Replaces the button text. |
| set_visible | (visible: boolean) -> () | Shows or hides the button. |