Datatype · Userdata
GuiToggle
userdata
Toggle proxy returned by GuiCategory:add_toggle. Holds a boolean state.
Fields
| Name | Type | Description |
|---|---|---|
| category | GuiCategory? | Back-reference to the owning category. |
| destroy | () -> () | Marks the toggle destroyed. |
| get_boolean | () -> boolean | Returns the current state. |
| is_destroyed | () -> boolean | Returns the destroyed flag. |
| is_visible | () -> boolean | Returns the visibility flag. |
| kind | ControlKind | Always |
| label | string | Current label text. |
| name | string | Alias for |
| on_changed | (callback: (value: boolean) -> ()) -> GuiConnection | Registers an additional change listener. |
| set_boolean | (value: boolean) -> () | Writes the state. |
| set_label | (text: string) -> () | Replaces the label. |
| set_visible | (visible: boolean) -> () | Shows or hides the toggle. |