Datatype · Userdata

GuiButton

userdata

Button proxy returned by GuiCategory:add_button. Fires its constructor callback on press.

Fields

NameTypeDescription
categoryGuiCategory?

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

destroy() -> ()

Marks the button destroyed.

is_destroyed() -> boolean

Returns the destroyed flag.

is_visible() -> boolean

Returns the visibility flag.

kindControlKind

Always Enum.ControlKind.Button.

labelstring

Current button text.

namestring

Alias for label.

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.