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,25 @@
## setWrap
### Description
Determines whether the child objects should wrap onto the next line when there isn't enough room along the main axis. The default value is 'nowrap'.
### Parameters
1. `string` If set to `wrap`, the child objects will wrap onto the next line when they run out of space. If set to `nowrap`, they will not.
### Returns
1. `object` The object in use
### Usage
* Creates a default Flexbox and sets the wrapping to `wrap`.
```lua
local main = basalt.createFrame()
local flexbox = mainFrame:addFlexbox()
:setWrap("wrap")
```
If the contents of the Flexbox exceed its size, they will automatically move to the next line, creating a wrapping effect. This is particularly useful when designing responsive layouts that adapt to different screen sizes or window dimensions.