Datatype · Userdata

GuiToggle

userdata

Toggle proxy returned by GuiCategory:add_toggle. Holds a boolean state.

Fields

NameTypeDescription
categoryGuiCategory?

Back-reference to the owning category. nil after the owning tab is gone.

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.

kindControlKind

Always Enum.ControlKind.Toggle.

labelstring

Current label text.

namestring

Alias for label.

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.