Skip to content

UIText

Defined in: ui/src/UIText.ts:17

Lightweight wrapper around a PixiJS Text for use in UI panels.

new UIText(props): UIText

Defined in: ui/src/UIText.ts:35

UITextProps

UIText

readonly displayObject: DisplayContainer

Defined in: ui/src/UIText.ts:18

UIElement.displayObject


readonly yogaNode: Node

Defined in: ui/src/UIText.ts:19

UIElement.yogaNode

get visible(): boolean

Defined in: ui/src/UIText.ts:139

boolean

set visible(v): void

Defined in: ui/src/UIText.ts:143

boolean

void

UIElement.visible

destroy(): void

Defined in: ui/src/UIText.ts:198

Idempotent — a second call is a no-op.

void

UIElement.destroy


mergeStyle(s): void

Defined in: ui/src/UIText.ts:135

Patch the current style: merge s over the properties already set (construction or a prior setStyle/mergeStyle) and re-apply. Unlike setStyle, properties you don’t pass are preserved — handy for an imperative recolour (mergeStyle({ fill })) that keeps the font, size, weight, etc.

Partial<TextStyle>

void


setStyle(s): void

Defined in: ui/src/UIText.ts:119

Replace the text style. Unset properties fall back to the engine + UI defaults (then Pixi’s), so this is a full replace, not a patch — to change a few properties while keeping the rest, use mergeStyle.

Partial<TextStyle>

void


setText(s?): void

Defined in: ui/src/UIText.ts:108

string

void


update(p): void

Defined in: ui/src/UIText.ts:148

Partial<UITextProps>

void

UIElement.update