Skip to content

PanelNode

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

Internal panel node used by both root UIPanel (Component) and nested child panels. Manages a Yoga container node, a PixiJS Container, optional background, and an ordered list of UIElement children.

new PanelNode(opts): PanelNode

Defined in: ui/src/UIPanel.ts:77

PanelProps

PanelNode

readonly container: Container

Defined in: ui/src/UIPanel.ts:64


readonly yogaNode: Node

Defined in: ui/src/UIPanel.ts:65

UIContainerElement.yogaNode

get children(): readonly UIElement[]

Defined in: ui/src/UIPanel.ts:87

readonly UIElement[]

UIContainerElement.children


get displayObject(): Container

Defined in: ui/src/UIPanel.ts:67

Container

UIContainerElement.displayObject


get visible(): boolean

Defined in: ui/src/UIPanel.ts:155

boolean

set visible(v): void

Defined in: ui/src/UIPanel.ts:159

boolean

void

UIContainerElement.visible

addElement(child): void

Defined in: ui/src/UIPanel.ts:91

UIElement

void

UIContainerElement.addElement


applyLayout(): void

Defined in: ui/src/UIPanel.ts:172

Recursively apply Yoga computed layout to PixiJS positions. Call this after yogaNode.calculateLayout() on the root.

void

UIContainerElement.applyLayout


button(label, opts): UIButton

Defined in: ui/src/UIPanel.ts:138

Add a button element.

string

Omit<UIButtonProps, "children">

UIButton


destroy(): void

Defined in: ui/src/UIPanel.ts:288

void

UIContainerElement.destroy


insertElementBefore(child, before): void

Defined in: ui/src/UIPanel.ts:105

UIElement

UIElement

void

UIContainerElement.insertElementBefore


panel(opts?): PanelNode

Defined in: ui/src/UIPanel.ts:145

Add a nested child panel.

PanelProps

PanelNode


removeElement(child): void

Defined in: ui/src/UIPanel.ts:97

UIElement

void

UIContainerElement.removeElement


text(content, style?): UIText

Defined in: ui/src/UIPanel.ts:129

Add a text element.

string

Partial<TextStyleOptions>

UIText


update(props): void

Defined in: ui/src/UIPanel.ts:212

Partial<PanelProps>

void

UIContainerElement.update