Skip to main content

Interface: UiAxisLayoutGroupDefaultedOptions

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

Fields shared by HorizontalLayoutGroupEcsComponent and VerticalLayoutGroupEcsComponent, with a sensible default; callers may omit these.

Extended by​

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.


childControlHeight​

childControlHeight: boolean

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

The height equivalent of childControlWidth.


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.


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).


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.


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.


spacing​

spacing: number

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

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