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:34

UITextProps

UIText

readonly displayObject: Container

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:138

boolean

set visible(v): void

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

boolean

void

UIElement.visible

destroy(): void

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

void

UIElement.destroy


mergeStyle(s): void

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

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<TextStyleOptions>

void


setStyle(s): void

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

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<TextStyleOptions>

void


setText(s?): void

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

string

void


update(p): void

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

Partial<UITextProps>

void

UIElement.update