.. _stdlib_ui_horizontal_layout_component: ================== UIHorizontalLayout ================== ++++++++++++ Enumerations ++++++++++++ .. _enum-ui_layout_base-LayoutAlignment: .. das:attribute:: 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 +++++++ .. _struct-ui_horizontal_layout_component-UIHorizontalLayout: .. das:attribute:: 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** : :ref:`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. .. _function-ui_horizontal_layout_component_UIHorizontalLayout_rq_layout_UIHorizontalLayout: .. das:function:: UIHorizontalLayout.layout() Applies horizontal layouting to the children of the node. .. note:: This function is called automatically every frame. .. _function-ui_horizontal_layout_component_UIHorizontalLayout_rq_apply_UIHorizontalLayout_array_ls_NodeId_gr__hh_: .. das:function:: UIHorizontalLayout.apply(childrenNodes: array#) Applies horizontal layouting to the given children. :Arguments: * **childrenNodes** : array< :ref:`NodeId ` >#