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 @@
## updateLayout
### Description
The `updateLayout` method forces the Flexbox container to manually update its layout. This is particularly useful in situations where dynamic changes occur within the Flexbox and you want to ensure that the layout correctly reflects these changes.
By default this is not necessarily required. Because the flexbox automatically updates it's layout.
### Returns
1. `object` The object in use
### Usage
* Creates a default Flexbox, adds an object to it, and then forces a manual layout update.
```lua
local main = basalt.createFrame()
local flexbox = mainFrame:addFlexbox()
flexbox:addObject(myObject)
flexbox:updateLayout() -- forces a manual update of the layout
```