Flexbox docs
This commit is contained in:
19
docs/objects/Flexbox/getSpacing.md
Normal file
19
docs/objects/Flexbox/getSpacing.md
Normal file
@@ -0,0 +1,19 @@
|
||||
## getSpacing
|
||||
|
||||
### Description
|
||||
|
||||
Returns the space between objects
|
||||
|
||||
### Returns
|
||||
|
||||
1. `number` Number of pixels of spacing between each object
|
||||
|
||||
### Usage
|
||||
|
||||
* Creates a default flexbox and prints the default spacing.
|
||||
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local flexbox = mainFrame:addFlexbox()
|
||||
basalt.debug(flexbox:getSpacing())
|
||||
```
|
||||
23
docs/objects/Flexbox/setFlexDirection.md
Normal file
23
docs/objects/Flexbox/setFlexDirection.md
Normal file
@@ -0,0 +1,23 @@
|
||||
## setFlexDirection
|
||||
|
||||
### Description
|
||||
|
||||
Sets the direction in which the children will be placed
|
||||
|
||||
### Parameters
|
||||
|
||||
1. `string` One of ("row", "column") - default is row
|
||||
|
||||
### Returns
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
### Usage
|
||||
|
||||
* Creates a default flexbox and sets the flex direction to column.
|
||||
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local flexbox = mainFrame:addFlexbox()
|
||||
:setFlexDirection("column")
|
||||
```
|
||||
23
docs/objects/Flexbox/setJustifyContent.md
Normal file
23
docs/objects/Flexbox/setJustifyContent.md
Normal file
@@ -0,0 +1,23 @@
|
||||
## setJustifyContent
|
||||
|
||||
### Description
|
||||
|
||||
Determines how the children are aligned along the main axis
|
||||
|
||||
### Parameters
|
||||
|
||||
1. `string` One of ("flex-start", "flex-end", "center", "space-between", "space-around") - default is flex-start. Works the same as the property of the same name in [CSS flexboxes](https://css-tricks.com/snippets/css/a-guide-to-flexbox/#aa-flexbox-properties)
|
||||
|
||||
### Returns
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
### Usage
|
||||
|
||||
* Creates a default flexbox and sets the justify content to space-between.
|
||||
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local flexbox = mainFrame:addFlexbox()
|
||||
:setJustifyContent("space-between")
|
||||
```
|
||||
23
docs/objects/Flexbox/setSpacing.md
Normal file
23
docs/objects/Flexbox/setSpacing.md
Normal file
@@ -0,0 +1,23 @@
|
||||
## setSpacing
|
||||
|
||||
### Description
|
||||
|
||||
Sets the space between objects
|
||||
|
||||
### Parameters
|
||||
|
||||
1. `number` Number of pixels of spacing between each object - default is 1
|
||||
|
||||
### Returns
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
### Usage
|
||||
|
||||
* Creates a default flexbox and sets the spacing to 5 pixels.
|
||||
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local flexbox = mainFrame:addFlexbox()
|
||||
:setSpacing(5)
|
||||
```
|
||||
Reference in New Issue
Block a user