The 2D layer · interface
UiNodeOptions
Explained in Sprites and tilemaps.
interface UiNodeOptionsimport type { UiNodeOptions } from '@driftengine/ui2d';Properties
| Name | Type | Description |
|---|---|---|
directionreadonlyoptional | 'row' | 'column' | |
widthreadonlyoptional | UiSize | |
heightreadonlyoptional | UiSize | |
paddingreadonlyoptional | number | One number for all four sides. Set the four fields for anything else. |
gapreadonlyoptional | number | |
alignreadonlyoptional | UiAlign | |
justifyreadonlyoptional | UiJustify | |
absolutereadonlyoptional | boolean | Taken out of the flow and placed at x, y inside the parent's content box. |
xreadonlyoptional | number | |
yreadonlyoptional | number | |
contentWidthreadonlyoptional | number | What a fit node measures when it has no children: a label's text, an icon's size. |
contentHeightreadonlyoptional | number | |
clipreadonlyoptional | boolean | Whether this node cuts its descendants to its own rectangle.MoreOff by default, because most nodes do not clip and one that does costs a scissor change in the pass. A scroll container sets it and a panel sets it; a row of buttons does not. |
scrollXreadonlyoptional | number | How far this node's contents are moved under it. Only meaningful with clip. |
scrollYreadonlyoptional | number | |
layerreadonlyoptional | number | Draw order beyond tree order. Inherited by descendants that do not set their own. |
backgroundreadonlyoptional | ArrayLike<number> | null | |
texturereadonlyoptional | number | The sprite slot this node draws from, or -1 for none. |
framereadonlyoptional | SpriteFrame | null | |
tintreadonlyoptional | ArrayLike<number> | null | |
textreadonlyoptional | string | |
interactivereadonlyoptional | boolean | |
focusablereadonlyoptional | boolean | |
namereadonlyoptional | string | For a caller to find its own node again. Not read by anything here. |