This commit is contained in:
NoryiE
2025-10-29 17:41:54 +00:00
parent e10f98554c
commit b9c0681695
12 changed files with 6 additions and 381 deletions

View File

@@ -1,35 +1,18 @@
# FlexBox
_This is the FlexBox class. It is a container that arranges its children in a flexible layout._
_The flexbox element adds the following properties to its children:_
Extends: `Container`
## Usage
```lua
local flex = main:addFlexbox({background=colors.black, width=30, height=10})
```
```lua
flex:addButton():setFlexGrow(1)
```
```lua
flex:addButton():setFlexGrow(1)
```
```lua
flex:addButton():setFlexGrow(1)
```
The flexbox element adds the following properties to its children:
```lua
flex:addButton():setFlexGrow(1) -- The flex-grow property defines the ability for a flex item to grow if necessary.
```
```lua
flex:addButton():setFlexShrink(1) -- The flex-shrink property defines the ability for a flex item to shrink if necessary.
```
```lua
flex:addButton():setFlexBasis(1) -- The flex-basis property defines the default size of an element before the remaining space is distributed.
```