Skip to content

PixiSelect

Defined in: ui/src/pixi-ui/PixiSelect.ts:255

Yoga-aware wrapper around @pixi/ui Select (dropdown).

While closed, a confirm press opens the list, and left and right step the selection. The open list takes the input of the focus scope around it: up and down move the highlighted row, confirm commits it and closes, cancel closes on the value the select already had, and left and right do nothing. Anything that closes the list hands the scope’s input back.

new PixiSelect(props): PixiSelect

Defined in: ui/src/pixi-ui/PixiSelect.ts:259

PixiSelectProps

PixiSelect

PixiUIBase.constructor

readonly _transform: ElementTransform

Defined in: ui/src/UIElementBase.ts:20

Internal

UIInputCaptureElement._transform

PixiUIBase._transform


readonly displayObject: DisplayContainer

Defined in: ui/src/pixi-ui/PixiUIBase.ts:43

UIInputCaptureElement.displayObject

PixiUIBase.displayObject


protected prevProps: Record<string, unknown> = {}

Defined in: ui/src/pixi-ui/PixiUIBase.ts:46

PixiUIBase.prevProps


protected readonly view: PortalSelect

Defined in: ui/src/pixi-ui/PixiUIBase.ts:45

PixiUIBase.view


readonly yogaNode: Node

Defined in: ui/src/pixi-ui/PixiUIBase.ts:44

UIInputCaptureElement.yogaNode

PixiUIBase.yogaNode

get disabled(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:199

Whether the widget refuses the pointer and a confirm press. Only a widget whose @pixi/ui view carries an enabled flag reports true.

boolean

PixiUIBase.disabled


get focusable(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:222

Whether the widget takes part in focus navigation.

boolean

PixiUIBase.focusable


get focused(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:204

Whether the widget holds focus in the scope that owns it.

boolean

PixiUIBase.focused


get protected hovered(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:209

Whether the pointer is over the widget.

boolean

PixiUIBase.hovered


get protected interactive(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:191

Whether the wrapped widget answers the player. One that only displays a value keeps its view’s own event mode and stays out of navigation unless focusable asks for it.

boolean

PixiUIBase.interactive


get protected pressed(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:217

Whether any device is holding the widget down: the pointer, a confirm press from a focus scope, or both.

boolean

PixiUIBase.pressed


get rotation(): number

Defined in: ui/src/UIElementBase.ts:50

See LayoutProps.rotation.

number

set rotation(value): void

Defined in: ui/src/UIElementBase.ts:54

number

void

PixiUIBase.rotation


get scale(): Readonly<{ x: number; y: number; }>

Defined in: ui/src/UIElementBase.ts:41

See LayoutProps.scale.

Readonly<{ x: number; y: number; }>

set scale(value): void

Defined in: ui/src/UIElementBase.ts:45

number | { x: number; y: number; }

void

PixiUIBase.scale


get transformOrigin(): Readonly<{ x: number; y: number; }>

Defined in: ui/src/UIElementBase.ts:32

See LayoutProps.transformOrigin.

Readonly<{ x: number; y: number; }>

set transformOrigin(value): void

Defined in: ui/src/UIElementBase.ts:36

number | { x: number; y: number; }

void

PixiUIBase.transformOrigin


get visible(): boolean

Defined in: ui/src/pixi-ui/PixiUIBase.ts:64

boolean

set visible(v): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:68

boolean

void

UIInputCaptureElement.visible

PixiUIBase.visible


get zIndex(): number

Defined in: ui/src/UIElementBase.ts:59

See LayoutProps.zIndex.

number

set zIndex(value): void

Defined in: ui/src/UIElementBase.ts:63

number

void

PixiUIBase.zIndex

_inspectState(): object

Defined in: ui/src/pixi-ui/PixiUIBase.ts:399

Internal

object

disabled: boolean

focusable: boolean

focused: boolean

PixiUIBase._inspectState


activate(): void

Defined in: ui/src/pixi-ui/PixiSelect.ts:306

Open or close the dropdown.

void

PixiUIBase.activate


protected adjust(direction): boolean

Defined in: ui/src/pixi-ui/PixiSelect.ts:361

Step the closed select on left and right. At either end the press is not consumed, so focus leaves the dropdown. An open list routes every direction to moveCapture, so this never runs while it shows.

FocusDirection

boolean

PixiUIBase.adjust


applyLayout(): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:308

void

UIInputCaptureElement.applyLayout

PixiUIBase.applyLayout


protected applyTransformProps(props): void

Defined in: ui/src/UIElementBase.ts:27

Apply the four transform props present in props. A present key holding undefined resets that prop to its default. Throws before writing anything if a value is not finite.

LayoutProps

void

PixiUIBase.applyTransformProps


protected bridgeSignal<F>(signal, key, kind, newProps): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:317

Bridge a @pixi/ui Signal to a callback prop. Only reconnects if ref changed.

F extends (…args) => void

(cb) => void

(cb) => void

string

string

Record<string, unknown>

void

PixiUIBase.bridgeSignal


cancelCapture(): void

Defined in: ui/src/pixi-ui/PixiSelect.ts:339

Close the list on the value the select already had.

void

UIInputCaptureElement.cancelCapture


confirmCapture(): void

Defined in: ui/src/pixi-ui/PixiSelect.ts:334

Commit the highlighted row, which closes the list.

void

UIInputCaptureElement.confirmCapture


destroy(): void

Defined in: ui/src/pixi-ui/PixiSelect.ts:425

void

UIInputCaptureElement.destroy

PixiUIBase.destroy


protected disconnectAll(): void

Defined in: ui/src/pixi-ui/PixiSelect.ts:435

Override in subclass to disconnect all signals on destroy.

void

PixiUIBase.disconnectAll


protected disconnectBridgedSignal<F>(signal, key): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:353

F extends (…args) => void

(cb) => void

string

void

PixiUIBase.disconnectBridgedSignal


protected focusOutlineBox(): UIFocusOutlineBox

Defined in: ui/src/pixi-ui/PixiSelect.ts:300

The closed button’s box. While the list is open the button is hidden and the list draws on the stage, so this container draws nothing to outline.

UIFocusOutlineBox

PixiUIBase.focusOutlineBox


protected fromViewSpace(box): UIFocusOutlineBox

Defined in: ui/src/pixi-ui/PixiUIBase.ts:297

Map a rectangle from the widget view’s own space into this element’s.

UIFocusOutlineBox

UIFocusOutlineBox

PixiUIBase.fromViewSpace


protected intrinsicSize(): object

Defined in: ui/src/pixi-ui/PixiSelect.ts:377

The open list is an overlay on the stage and the closed button is hidden while it shows, so layout follows the closed button at all times.

object

height: number

width: number

PixiUIBase.intrinsicSize


protected invalidateSize(): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:373

Re-measure on the next layout pass. Yoga caches a measure function’s result, so a prop that changes the widget’s intrinsic size (its text, its item list) leaves the old size in the tree until the node is dirtied.

void

PixiUIBase.invalidateSize


moveCapture(direction): void

Defined in: ui/src/pixi-ui/PixiSelect.ts:326

Walk the open list. Up and down stop at either end without wrapping, and the press is kept either way, so it never reaches the menu behind the list. Left and right do nothing: the open list is handed every direction, so adjust and a game’s onAdjust wait until it closes.

FocusDirection

void

UIInputCaptureElement.moveCapture


releaseCapture(): void

Defined in: ui/src/pixi-ui/PixiSelect.ts:344

Focus leaving the select, or its menu losing the keys, closes the list.

void

UIInputCaptureElement.releaseCapture


protected setPressed(pressed): void

Defined in: ui/src/pixi-ui/PixiSelect.ts:348

Show the widget’s pressed face while a device holds it down, and its resting face once every device has let go. A widget with no pressed face leaves it out.

true arrives again where the widget has repainted itself under a press that is still held, so an implementation sets the face and never toggles it.

boolean

void

PixiUIBase.setPressed


protected sizedByLayout(): boolean

Defined in: ui/src/pixi-ui/PixiSelect.ts:292

Select is a composite: a closed button over a scrolling list. Sizing its container scales both out of shape, so it keeps its own size.

boolean

PixiUIBase.sizedByLayout


update(props): void

Defined in: ui/src/pixi-ui/PixiSelect.ts:381

Record<string, unknown>

void

UIInputCaptureElement.update

PixiUIBase.update


protected updateBase(props): void

Defined in: ui/src/pixi-ui/PixiUIBase.ts:378

Apply layout props, visible, and store prevProps. Call at end of subclass update().

Record<string, unknown>

void

PixiUIBase.updateBase

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/ui.md.