Skip to content

UINineSlice

Defined in: ui/src/UINineSlice.ts:24

Displays a nine-slice texture as a UI element. Requires explicit width/height from layout.

new UINineSlice(props): UINineSlice

Defined in: ui/src/UINineSlice.ts:38

UINineSliceProps

UINineSlice

UIElementBase.constructor

readonly _transform: ElementTransform

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

Internal

UIElementBase._transform


readonly container: NineSliceSprite

Defined in: ui/src/UINineSlice.ts:25


readonly yogaNode: Node

Defined in: ui/src/UINineSlice.ts:26

UIElementBase.yogaNode

get displayObject(): DisplayContainer

Defined in: ui/src/UINineSlice.ts:28

DisplayContainer

UIElementBase.displayObject


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

UIElementBase.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

UIElementBase.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

UIElementBase.transformOrigin


get visible(): boolean

Defined in: ui/src/UINineSlice.ts:109

boolean

set visible(v): void

Defined in: ui/src/UINineSlice.ts:113

boolean

void

UIElementBase.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

UIElementBase.zIndex

_inspectState(): object

Defined in: ui/src/UINineSlice.ts:157

Internal

What the Inspector reports for this nine-slice: whether it takes part in focus navigation, which is off unless the game asked for it, and whether it holds focus right now. A test reads this instead of a screenshot.

object

focusable: boolean

focused: boolean


applyLayout(): void

Defined in: ui/src/UINineSlice.ts:100

Set sprite dimensions to match Yoga computed size.

void


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

UIElementBase.applyTransformProps


destroy(): void

Defined in: ui/src/UINineSlice.ts:162

Idempotent — a second call is a no-op.

void

UIElementBase.destroy


update(p): void

Defined in: ui/src/UINineSlice.ts:118

Partial<UINineSliceProps>

void

UIElementBase.update

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.