Skip to main content

Interface: CreateDropdownDefaultedOptions

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

Fields of CreateDropdownOptions with a sensible default; callers may omit these.

Properties​

anchor​

anchor: UiAnchorConfig

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

The anchor to place the header with - see UiAnchor for common presets (e.g. UiAnchor.topLeft({ x: 240, y: 56 })). Defaults to UiAnchor.topLeft({ x: 240, y: 56 }).


anchoredPosition?​

optional anchoredPosition?: Vector2

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

Offset of the header's pivot from its anchor reference point, in reference pixels.


interactable?​

optional interactable?: Partial<UiInteractableDefaultedOptions>

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

Overrides for the header's UiInteractableEcsComponent (e.g. to start it non-interactable). Also applied to every option row.


labelCategory?​

optional labelCategory?: number

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

The render category the header's and each option's label text draws with, forwarded to createLabel's category option - see CreateButtonDefaultedOptions.labelCategory for why there's no shared default to fall back on.


labelColor​

labelColor: Color

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

The header's and each option's label tint. Defaults to Color.black.


labelSize​

labelSize: number

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

The header's and each option's label font size, in reference pixels. Defaults to 24.


optionHeight?​

optional optionHeight?: number

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

Each option row's height, in reference pixels. Defaults to the header's own height.


selectedIndex​

selectedIndex: number

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

The index into options initially selected. Defaults to 0.


slices?​

optional slices?: NineSliceOptions

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

Overrides headerSprite.slices/optionSprite.slices.


transition?​

optional transition?: Partial<UiColorTransitionDefaultedOptions>

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

Overrides for the header's and each option row's UiColorTransitionEcsComponent.