UIFlowLayout

Enumerations

LayoutDirection

Direction of the layout.

Values:
  • Horizontal = 0x0u8 - Arranges children horizontally.

  • Vertical = 0x1u8 - Arranges children vertically.

Classes

UIFlowLayout : Component

Note

UIFrame component is automatically added to the node if it is not already present

This component arranges node’s children sequentially wrapping them to the next row if they don’t fit 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:
  • direction : LayoutDirection = ui_layout_base::LayoutDirection.Horizontal - Direction of the layout. Default is Horizontal.

  • alignment : LayoutAlignment - Alignment of the layout within the parent frame. Default is TopLeft.

  • spacing : float2 - Spacing between children.

  • padding : float4 - Padding in pixels, float4(left, top, right, bottom).

UIFlowLayout.layout()

Applies flow layouting strategy to the children of the node.

Note

This function is called automatically every frame.

UIFlowLayout.apply(childrenNodes: array<NodeId>#)

Applies flow layouting to the given children.

Arguments:
  • childrenNodes : array< NodeId >#