Flexbox docs

Updated the flexbox documentation for the current flexbox implementation
This commit is contained in:
Robert Jelic
2023-05-19 15:50:05 +02:00
parent 930d2ad0c8
commit 631eef525c
16 changed files with 299 additions and 36 deletions

View File

@@ -0,0 +1,22 @@
## addBreak
### Description
The `addBreak` method adds a line break to the Flexbox container. This causes the subsequent children to start on a new line or column, depending on the flex direction. This is helpful when you want to control the arrangement of children within the Flexbox container.
### Returns
1. `object` The object in use
### Usage
* Creates a default Flexbox, adds some objects to it, and then adds a break before adding more objects.
```lua
local main = basalt.createFrame()
local flexbox = mainFrame:addFlexbox()
flexbox:addButton()
flexbox:addButton()
flexbox:addBreak() -- adds a line break
flexbox:addButton() -- this object will start on a new line
```