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.
Extends
Section titled “Extends”PixiUIBase<PortalSelect>
Implements
Section titled “Implements”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PixiSelect(
props):PixiSelect
Defined in: ui/src/pixi-ui/PixiSelect.ts:259
Parameters
Section titled “Parameters”Returns
Section titled “Returns”PixiSelect
Overrides
Section titled “Overrides”Properties
Section titled “Properties”_transform
Section titled “_transform”
readonly_transform:ElementTransform
Defined in: ui/src/UIElementBase.ts:20
Internal
Implementation of
Section titled “Implementation of”UIInputCaptureElement._transform
Inherited from
Section titled “Inherited from”displayObject
Section titled “displayObject”
readonlydisplayObject:DisplayContainer
Defined in: ui/src/pixi-ui/PixiUIBase.ts:43
Implementation of
Section titled “Implementation of”UIInputCaptureElement.displayObject
Inherited from
Section titled “Inherited from”prevProps
Section titled “prevProps”
protectedprevProps:Record<string,unknown> ={}
Defined in: ui/src/pixi-ui/PixiUIBase.ts:46
Inherited from
Section titled “Inherited from”
protectedreadonlyview:PortalSelect
Defined in: ui/src/pixi-ui/PixiUIBase.ts:45
Inherited from
Section titled “Inherited from”yogaNode
Section titled “yogaNode”
readonlyyogaNode:Node
Defined in: ui/src/pixi-ui/PixiUIBase.ts:44
Implementation of
Section titled “Implementation of”UIInputCaptureElement.yogaNode
Inherited from
Section titled “Inherited from”Accessors
Section titled “Accessors”disabled
Section titled “disabled”Get Signature
Section titled “Get Signature”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.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”focusable
Section titled “focusable”Get Signature
Section titled “Get Signature”get focusable():
boolean
Defined in: ui/src/pixi-ui/PixiUIBase.ts:222
Whether the widget takes part in focus navigation.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”focused
Section titled “focused”Get Signature
Section titled “Get Signature”get focused():
boolean
Defined in: ui/src/pixi-ui/PixiUIBase.ts:204
Whether the widget holds focus in the scope that owns it.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”hovered
Section titled “hovered”Get Signature
Section titled “Get Signature”get
protectedhovered():boolean
Defined in: ui/src/pixi-ui/PixiUIBase.ts:209
Whether the pointer is over the widget.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”interactive
Section titled “interactive”Get Signature
Section titled “Get Signature”get
protectedinteractive():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.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”pressed
Section titled “pressed”Get Signature
Section titled “Get Signature”get
protectedpressed():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.
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”rotation
Section titled “rotation”Get Signature
Section titled “Get Signature”get rotation():
number
Defined in: ui/src/UIElementBase.ts:50
See LayoutProps.rotation.
Returns
Section titled “Returns”number
Set Signature
Section titled “Set Signature”set rotation(
value):void
Defined in: ui/src/UIElementBase.ts:54
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Get Signature
Section titled “Get Signature”get scale():
Readonly<{x:number;y:number; }>
Defined in: ui/src/UIElementBase.ts:41
See LayoutProps.scale.
Returns
Section titled “Returns”Readonly<{ x: number; y: number; }>
Set Signature
Section titled “Set Signature”set scale(
value):void
Defined in: ui/src/UIElementBase.ts:45
Parameters
Section titled “Parameters”number | { x: number; y: number; }
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”transformOrigin
Section titled “transformOrigin”Get Signature
Section titled “Get Signature”get transformOrigin():
Readonly<{x:number;y:number; }>
Defined in: ui/src/UIElementBase.ts:32
See LayoutProps.transformOrigin.
Returns
Section titled “Returns”Readonly<{ x: number; y: number; }>
Set Signature
Section titled “Set Signature”set transformOrigin(
value):void
Defined in: ui/src/UIElementBase.ts:36
Parameters
Section titled “Parameters”number | { x: number; y: number; }
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”visible
Section titled “visible”Get Signature
Section titled “Get Signature”get visible():
boolean
Defined in: ui/src/pixi-ui/PixiUIBase.ts:64
Returns
Section titled “Returns”boolean
Set Signature
Section titled “Set Signature”set visible(
v):void
Defined in: ui/src/pixi-ui/PixiUIBase.ts:68
Parameters
Section titled “Parameters”boolean
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Inherited from
Section titled “Inherited from”zIndex
Section titled “zIndex”Get Signature
Section titled “Get Signature”get zIndex():
number
Defined in: ui/src/UIElementBase.ts:59
See LayoutProps.zIndex.
Returns
Section titled “Returns”number
Set Signature
Section titled “Set Signature”set zIndex(
value):void
Defined in: ui/src/UIElementBase.ts:63
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”_inspectState()
Section titled “_inspectState()”_inspectState():
object
Defined in: ui/src/pixi-ui/PixiUIBase.ts:399
Internal
Returns
Section titled “Returns”object
disabled
Section titled “disabled”disabled:
boolean
focusable
Section titled “focusable”focusable:
boolean
focused
Section titled “focused”focused:
boolean
Inherited from
Section titled “Inherited from”activate()
Section titled “activate()”activate():
void
Defined in: ui/src/pixi-ui/PixiSelect.ts:306
Open or close the dropdown.
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”adjust()
Section titled “adjust()”
protectedadjust(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.
Parameters
Section titled “Parameters”direction
Section titled “direction”Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”applyLayout()
Section titled “applyLayout()”applyLayout():
void
Defined in: ui/src/pixi-ui/PixiUIBase.ts:308
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”UIInputCaptureElement.applyLayout
Inherited from
Section titled “Inherited from”applyTransformProps()
Section titled “applyTransformProps()”
protectedapplyTransformProps(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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”PixiUIBase.applyTransformProps
bridgeSignal()
Section titled “bridgeSignal()”
protectedbridgeSignal<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.
Type Parameters
Section titled “Type Parameters”F extends (…args) => void
Parameters
Section titled “Parameters”signal
Section titled “signal”connect
Section titled “connect”(cb) => void
disconnect
Section titled “disconnect”(cb) => void
string
string
newProps
Section titled “newProps”Record<string, unknown>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”cancelCapture()
Section titled “cancelCapture()”cancelCapture():
void
Defined in: ui/src/pixi-ui/PixiSelect.ts:339
Close the list on the value the select already had.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”UIInputCaptureElement.cancelCapture
confirmCapture()
Section titled “confirmCapture()”confirmCapture():
void
Defined in: ui/src/pixi-ui/PixiSelect.ts:334
Commit the highlighted row, which closes the list.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”UIInputCaptureElement.confirmCapture
destroy()
Section titled “destroy()”destroy():
void
Defined in: ui/src/pixi-ui/PixiSelect.ts:425
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Overrides
Section titled “Overrides”disconnectAll()
Section titled “disconnectAll()”
protecteddisconnectAll():void
Defined in: ui/src/pixi-ui/PixiSelect.ts:435
Override in subclass to disconnect all signals on destroy.
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”disconnectBridgedSignal()
Section titled “disconnectBridgedSignal()”
protecteddisconnectBridgedSignal<F>(signal,key):void
Defined in: ui/src/pixi-ui/PixiUIBase.ts:353
Type Parameters
Section titled “Type Parameters”F extends (…args) => void
Parameters
Section titled “Parameters”signal
Section titled “signal”disconnect
Section titled “disconnect”(cb) => void
string
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”PixiUIBase.disconnectBridgedSignal
focusOutlineBox()
Section titled “focusOutlineBox()”
protectedfocusOutlineBox():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.
Returns
Section titled “Returns”Overrides
Section titled “Overrides”fromViewSpace()
Section titled “fromViewSpace()”
protectedfromViewSpace(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.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”intrinsicSize()
Section titled “intrinsicSize()”
protectedintrinsicSize():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.
Returns
Section titled “Returns”object
height
Section titled “height”height:
number
width:
number
Overrides
Section titled “Overrides”invalidateSize()
Section titled “invalidateSize()”
protectedinvalidateSize():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.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”moveCapture()
Section titled “moveCapture()”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.
Parameters
Section titled “Parameters”direction
Section titled “direction”Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”UIInputCaptureElement.moveCapture
releaseCapture()
Section titled “releaseCapture()”releaseCapture():
void
Defined in: ui/src/pixi-ui/PixiSelect.ts:344
Focus leaving the select, or its menu losing the keys, closes the list.
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”UIInputCaptureElement.releaseCapture
setPressed()
Section titled “setPressed()”
protectedsetPressed(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.
Parameters
Section titled “Parameters”pressed
Section titled “pressed”boolean
Returns
Section titled “Returns”void
Overrides
Section titled “Overrides”sizedByLayout()
Section titled “sizedByLayout()”
protectedsizedByLayout():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.
Returns
Section titled “Returns”boolean
Overrides
Section titled “Overrides”update()
Section titled “update()”update(
props):void
Defined in: ui/src/pixi-ui/PixiSelect.ts:381
Parameters
Section titled “Parameters”Record<string, unknown>
Returns
Section titled “Returns”void
Implementation of
Section titled “Implementation of”Overrides
Section titled “Overrides”updateBase()
Section titled “updateBase()”
protectedupdateBase(props):void
Defined in: ui/src/pixi-ui/PixiUIBase.ts:378
Apply layout props, visible, and store prevProps. Call at end of subclass update().
Parameters
Section titled “Parameters”Record<string, unknown>
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”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.