UIHorizontalLayout
Enumerations
- LayoutAlignment
Alignment of the layout within the node’s frame.
- Values:
TopLeft = 0x0u8 - Aligns children to top left corner of the node’s frame.
TopCenter = 0x1u8 - Aligns children to top center corner of the node’s frame.
TopRight = 0x2u8 - Aligns children to top right corner of the node’s frame.
MiddleLeft = 0x3u8 - Aligns children to middle left corner of the node’s frame.
MiddleCenter = 0x4u8 - Aligns children to middle center corner of the node’s frame.
MiddleRight = 0x5u8 - Aligns children to middle bottom corner of the node’s frame.
BottomLeft = 0x6u8 - Aligns children to bottom left corner of the node’s frame.
BottomCenter = 0x7u8 - Aligns children to bottom center corner of the node’s frame.
BottomRight = 0x8u8 - Aligns children to bottom right corner of the node’s frame.
Classes
- UIHorizontalLayout : Component
Note
UIFrame component is automatically added to the node if it is not already present
This component arranges node’s children horizontally using specified spacing, padding and alignment.
If child node doesn’t have UIFrame component, it won’t participate in layouting.
Note
To work properly, UICanvas component is required in one of the parent nodes.
- Fields:
alignment : LayoutAlignment - Alignment of the layout within the parent frame. Default is
TopLeft.spacing : float - Spacing between children.
padding : float4 - Padding in pixels, float4(left, top, right, bottom).
childForceExpandWidth : bool - If true, last child frame will expand to fill the available width.
childForceExpandHeight : bool - If true, child frames will expand to fill the available height.
- UIHorizontalLayout.layout()
Applies horizontal layouting to the children of the node.
Note
This function is called automatically every frame.
- UIHorizontalLayout.apply(childrenNodes: array<NodeId>#)
Applies horizontal layouting to the given children.
- Arguments:
childrenNodes : array< NodeId >#