mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Add Flex widget documentation
This commit is contained in:
parent
3c74a20335
commit
3580f8ab43
@ -81,6 +81,7 @@ Widget types
|
|||||||
Text: Displays text. <widgets/text>
|
Text: Displays text. <widgets/text>
|
||||||
TextEdit: Accepts text input from the user. <widgets/textedit>
|
TextEdit: Accepts text input from the user. <widgets/textedit>
|
||||||
Image: Renders a texture. <widgets/image>
|
Image: Renders a texture. <widgets/image>
|
||||||
|
Flex: Aligns children in a column/row <widgets/flex>
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
|
43
docs/source/reference/lua-scripting/widgets/flex.rst
Normal file
43
docs/source/reference/lua-scripting/widgets/flex.rst
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
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)
|
||||||
|
- Flex aligns its children in a row if true, otherwise in a column.
|
||||||
|
* - 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
|
||||||
|
- ui.ALIGNMETN (Start)
|
||||||
|
- 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`.
|
Loading…
x
Reference in New Issue
Block a user