Datatype · Userdata
GuiDropdown
userdata
Dropdown proxy returned by GuiCategory:add_dropdown. 1-based indices, with 0 reserved for "no selection".
Fields
| Name | Type | Description |
|---|---|---|
| category | GuiCategory? | Back-reference to the owning category. |
| destroy | () -> () | Marks the dropdown destroyed. |
| get_index | () -> number | Returns the current 1-based index. |
| get_selected | () -> string? | Returns the current option text. |
| 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: (index: number) -> ()) -> GuiConnection | Registers an additional change listener. |
| set_index | (index: number) -> () | Sets the dropdown's index. |
| set_label | (text: string) -> () | Replaces the label. |
| set_selected | (value: string) -> boolean | Selects the option whose text matches |
| set_visible | (visible: boolean) -> () | Shows or hides the dropdown. |
| update_options | (options: { string }) -> () | Replaces the option list. |