Skip to main content

Interface: Dropdown

Defined in: ui/utilities/create-dropdown.ts:95

Properties​

chevron​

chevron: number

Defined in: ui/utilities/create-dropdown.ts:115

The chevron label entity, parented to the header - shows v while closed and ^ while open (see chevronClosedText/chevronOpenText; the bundled default font atlas is ASCII-only, so these stand in for a down/up-pointing triangle).


dropdown: UiDropdownEcsComponent

Defined in: ui/utilities/create-dropdown.ts:118

The dropdown's UiDropdownEcsComponent, for reading isOpen/selectedIndex directly.


entity​

entity: number

Defined in: ui/utilities/create-dropdown.ts:97

The dropdown's root entity - the header - a createButton result's entity, also carrying the UiDropdownEcsComponent.


header: Button

Defined in: ui/utilities/create-dropdown.ts:100

The header button, showing the currently selected option's label. Clicking it toggles isOpen.


onValueChanged​

onValueChanged: ParameterizedForgeEvent<number>

Defined in: ui/utilities/create-dropdown.ts:125

Raised whenever an option is selected - dropdown.onValueChanged, surfaced directly since registering a single listener on it is the overwhelmingly common case.


options​

options: Button[]

Defined in: ui/utilities/create-dropdown.ts:107

The option row buttons, in options order, parented to the header - hidden (invisible and non-interactable) while closed. Clicking one selects it and closes the list.