|
GearBlocks
The GearBlocks Lua scripting API
|
A dropdown UI element. More...
Public Member Functions | |
| void | AddOption (string name) |
| Add an option to the dropdown menu. | |
| void | AddOption (string name, bool selectable) |
| Add an option to the dropdown menu. | |
| void | AddOptions (IList< string > names) |
| Add options to the dropdown menu. | |
| void | AddOptions (IList<(string, bool)> options) |
| Add options to the dropdown menu. | |
| void | ClearOptions () |
| Clear all options from the dropdown menu. | |
| void | SetAlignment (Align align, float paramA, float paramB) |
| Set the element's alignment. | |
| void | SetRotation (float angle) |
| Set the element's rotation. | |
| void | AddOption (string name) |
| Add an option to the dropdown menu. | |
| void | AddOption (string name, bool selectable) |
| Add an option to the dropdown menu. | |
| void | AddOptions (IList< string > names) |
| Add options to the dropdown menu. | |
| void | AddOptions (IList<(string, bool)> options) |
| Add options to the dropdown menu. | |
| void | ClearOptions () |
| Clear all options from the dropdown menu. | |
Properties | |
| ValueChangedHandler | OnChanged |
| Event that is raised when the dropdown value is changed. | |
| int | Value [get, set] |
| The dropdown value. | |
| string | SelectedOption [get] |
| The selected dropdown option. | |
| int | NumOptions [get] |
| The number of dropdown options. | |
Properties inherited from SmashHammer.UI.Element | |
| virtual bool | IsVisible [get, set] |
| Is the element visible? | |
Properties inherited from SmashHammer.UI.IElement | |
| bool | IsVisible [get, set] |
| Is the element visible? | |
| bool | IsInteractable [get, set] |
| Is the element interactable? | |
| bool | IsTargetable [get, set] |
| Is the element targetable? | |
Properties inherited from SmashHammer.UI.IDropdown | |
| int | Value [get, set] |
| The dropdown value. | |
| string | SelectedOption [get] |
| The selected dropdown option. | |
| int | NumOptions [get] |
| The number of dropdown options. | |
Additional Inherited Members | |
Public Types inherited from SmashHammer.UI.ISizeable | |
| enum | Align : byte { LeftEdge , RightEdge , TopEdge , BottomEdge , HorizEdges , VertEdges , HorizCentre , VertCentre } |
| UI element alignment mode. More... | |
Events inherited from SmashHammer.UI.IDropdown | |
| ValueChangedHandler | OnChanged |
| Event that is raised when the dropdown value is changed. | |
A dropdown UI element.
| void SmashHammer.UI.Dropdown.AddOption | ( | string | name | ) |
Add an option to the dropdown menu.
| name | The name of the option to add. |
Implements SmashHammer.UI.IDropdown.
| void SmashHammer.UI.Dropdown.AddOption | ( | string | name, |
| bool | selectable | ||
| ) |
Add an option to the dropdown menu.
| name | The name of the option to add. |
| selectable | Set to true to make the option selectable; false to make it non-selectable. |
Implements SmashHammer.UI.IDropdown.
| void SmashHammer.UI.Dropdown.AddOptions | ( | IList< string > | names | ) |
Add options to the dropdown menu.
| names | A list of option names to add. |
Implements SmashHammer.UI.IDropdown.
| void SmashHammer.UI.Dropdown.AddOptions | ( | IList<(string, bool)> | options | ) |
Add options to the dropdown menu.
| options | A list of options (each specifying name and "is selectable" flag) to add. |
Implements SmashHammer.UI.IDropdown.
|
getset |
The dropdown value.
The index of the currently selected option in this dropdown menu.
Implements SmashHammer.UI.IDropdown.
|
get |
The selected dropdown option.
The currently selected option in this dropdown menu.
Implements SmashHammer.UI.IDropdown.
|
get |
The number of dropdown options.
The number of options in this dropdown menu.
Implements SmashHammer.UI.IDropdown.