Interface: UiDropdownEcsComponent
Defined in: ui/components/ui-dropdown-component.ts:34
A header + option-list selector's state. Unlike UiToggleEcsComponent/
UiSliderEcsComponent, there's no generic createUiDropdownEcsSystem -
opening/closing the option list touches several sibling entities'
SpriteEcsComponent.enabled/TextEcsComponent.enabled/
UiInteractableEcsComponent.interactable at once (so a closed list is
both invisible and un-raycastable), which only the assembly that created
those entities - createDropdown - knows how to reach. isOpen and
selectedIndex are written by createDropdown's own listeners; treat
them as read-only unless you're replacing that wiring with your own.
Extends
Properties
isOpen
isOpen:
boolean
Defined in: ui/components/ui-dropdown-component.ts:37
Whether the option list is currently expanded.
onValueChanged
readonlyonValueChanged:ParameterizedForgeEvent<number>
Defined in: ui/components/ui-dropdown-component.ts:40
Raised whenever an option is selected. Passes the newly selected index.
options
options: readonly
string[]
Defined in: ui/components/ui-dropdown-component.ts:11
The dropdown's option labels, in display order. Must be non-empty.
Inherited from
UiDropdownRequiredOptions.options
selectedIndex
selectedIndex:
number
Defined in: ui/components/ui-dropdown-component.ts:20
The index into options initially selected. Defaults to 0.