1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 22:53:53 +00:00
openmw/docs/source/reference/lua-scripting/widgets/flex.rst

48 lines
1.2 KiB
ReStructuredText
Raw Normal View History

2022-04-05 15:52:23 +00:00
Flex Widget
===========
Aligns its children along either a column or a row, depending on the `horizontal` property.
Properties
----------
.. list-table::
:header-rows: 1
:widths: 20 20 60
* - name
- type (default value)
- description
* - horizontal
- bool (false)
2022-05-14 10:27:30 +00:00
- | Flex aligns its children in a row (main axis is horizontal) if true,
| otherwise in a column (main axis is vertical).
2022-04-05 15:52:23 +00:00
* - autoSize
- bool (true)
- | If true, Flex will automatically resize to fit its contents.
| Children can't be relatively position/sized when true.
* - align
- ui.ALIGNMENT (Start)
- Where to align the children in the main axis.
* - arrange
2022-04-16 09:29:37 +00:00
- ui.ALIGNMENT (Start)
2022-04-05 15:52:23 +00:00
- How to arrange the children in the cross axis.
External
--------
.. list-table::
:header-rows: 1
:widths: 20 20 60
* - name
- type (default value)
- description
* - grow
- float (0)
- | Grow factor for the child. If there is unused space in the Flex,
| it will be split between widgets according to this value.
| Has no effect if `autoSize` is `true`.
2022-05-14 10:27:30 +00:00
* - stretch
- float (0)
- | Stretches the child to a percentage of the Flex's cross axis size.