Skip to content

PanelNode

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

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

PanelProps

PanelNode

readonly container: Container

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


readonly yogaNode: Node

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

UIContainerElement.yogaNode

get children(): readonly UIElement[]

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

readonly UIElement[]

UIContainerElement.children


get displayObject(): Container

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

Container

UIContainerElement.displayObject


get visible(): boolean

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

boolean

set visible(v): void

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

boolean

void

UIContainerElement.visible

addElement(child): void

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

UIElement

void

UIContainerElement.addElement


applyLayout(): void

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

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

Add a button element.

string

Omit<UIButtonProps, "children">

UIButton


destroy(): void

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

void

UIContainerElement.destroy


insertElementBefore(child, before): void

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

UIElement

UIElement

void

UIContainerElement.insertElementBefore


panel(opts?): PanelNode

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

Add a nested child panel.

PanelProps

PanelNode


removeElement(child): void

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

UIElement

void

UIContainerElement.removeElement


text(content, style?): UIText

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

Add a text element.

string

Partial<TextStyleOptions>

UIText


update(props): void

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

Record<string, unknown>

void

UIContainerElement.update