Skip to content

PanelNode

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

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

PanelProps

PanelNode

readonly container: Container

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


readonly yogaNode: Node

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

UIContainerElement.yogaNode

get children(): readonly UIElement[]

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

readonly UIElement[]

UIContainerElement.children


get displayObject(): Container

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

Container

UIContainerElement.displayObject


get visible(): boolean

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

boolean

set visible(v): void

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

boolean

void

UIContainerElement.visible

addElement(child): void

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

UIElement

void

UIContainerElement.addElement


applyLayout(): void

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

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

Add a button element.

string

Omit<UIButtonProps, "children">

UIButton


destroy(): void

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

void

UIContainerElement.destroy


insertElementBefore(child, before): void

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

UIElement

UIElement

void

UIContainerElement.insertElementBefore


panel(opts?): PanelNode

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

Add a nested child panel.

PanelProps

PanelNode


removeElement(child): void

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

UIElement

void

UIContainerElement.removeElement


scrollView(opts?): ScrollViewNode

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

Add a nested scrollable viewport.

ScrollViewProps

ScrollViewNode


text(content, style?): UIText

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

Add a text element.

string

Partial<TextStyleOptions>

UIText


update(props): void

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

Partial<PanelProps>

void

UIContainerElement.update