Skip to main content

Interface: UiAxisLayoutGroupEcsComponent

Defined in: ui/components/layout-group-component.ts:87

ECS-style component interface for a horizontal or vertical layout group - direction is set by addHorizontalLayoutGroupComponent/ addVerticalLayoutGroupComponent and picks which axis createUiLayoutGroupEcsSystem treats as the "main" (arranged, spaced) axis versus the "cross" (aligned) axis.

Extends​

Properties​

childAlignment​

childAlignment: Vector2

Defined in: ui/components/layout-group-component.ts:51

Where children (as a block, along the main axis; individually, along the cross axis) sit within any leftover space after their own sizes and spacing are subtracted from the content box. See uiAlignments for presets.

Inherited from​

UiAxisLayoutGroupDefaultedOptions.childAlignment


childControlHeight​

childControlHeight: boolean

Defined in: ui/components/layout-group-component.ts:62

The height equivalent of childControlWidth.

Inherited from​

UiAxisLayoutGroupDefaultedOptions.childControlHeight


childControlWidth​

childControlWidth: boolean

Defined in: ui/components/layout-group-component.ts:59

Whether this group resizes each child's width - to its measured preferred size, plus a share of any leftover horizontal space if childForceExpandWidth is also set. false leaves a child's own width untouched; the group still positions it.

Inherited from​

UiAxisLayoutGroupDefaultedOptions.childControlWidth


childForceExpandHeight​

childForceExpandHeight: boolean

Defined in: ui/components/layout-group-component.ts:77

The height equivalent of childForceExpandWidth (main axis for a vertical group, cross axis for a horizontal one).

Inherited from​

UiAxisLayoutGroupDefaultedOptions.childForceExpandHeight


childForceExpandWidth​

childForceExpandWidth: boolean

Defined in: ui/components/layout-group-component.ts:74

With childControlWidth also set: on the main axis (a horizontal group's width), distributes any leftover space - content box width minus the sum of every child's own preferred width and inter-child spacing - across children, weighted by each child's LayoutElementEcsComponent.flexibleWidth (or evenly, if none of them set one). On the cross axis (a vertical group's width), simply stretches every child to the content box's full width, ignoring its own preferred width entirely.

Inherited from​

UiAxisLayoutGroupDefaultedOptions.childForceExpandWidth


direction​

readonly direction: "horizontal" | "vertical"

Defined in: ui/components/layout-group-component.ts:88


padding​

padding: UiLayoutGroupPadding

Defined in: ui/components/layout-group-component.ts:40

Inset between this group's rect and the content box its children fill.

Inherited from​

UiAxisLayoutGroupDefaultedOptions.padding


spacing​

spacing: number

Defined in: ui/components/layout-group-component.ts:43

Gap, in reference pixels, between adjacent children along the main axis.

Inherited from​

UiAxisLayoutGroupDefaultedOptions.spacing