This commit is contained in:
Sabine Lim
2023-05-08 18:56:12 +10:00
parent 3de3fbecb3
commit 166a234bd2
2 changed files with 26 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ In addition to the methods inherited from Frame, Container, VisualObject and Obj
|[getSpacing](objects/Flexbox/getSpacing.md)|Returns the space between objects
|[setFlexDirection](objects/Flexbox/setFlexDirection.md)|Sets the direction in which the children will be placed
|[setJustifyContent](objects/Flexbox/setJustifyContent.md)|Determines how the children are aligned along the main axis
|[setAlignItems](objects/Flexbox/setAlignItems.md)|Determines how the children are aligned along the off axis
### Example
@@ -18,11 +19,12 @@ local main = basalt.createFrame()
local flexbox = main:addFlexbox()
:setFlexDirection("column")
:setJustifyContent("space-between")
:setAlignItems("center")
:setSpacing(5)
```
Alternatively, you can create a flexbox using an XML layout:
```xml
<flexbox flexDirection="column" justifyContent="space-between" spacing="5">
<flexbox flexDirection="column" justifyContent="space-between" alignItems="center" spacing="5">
```