Basalt 1.7 Update
- New Objects (Flexbox, Graph, Treeview) - Pluginsystem to add/remove functionality - Reworked the entire Object system, instead of one big Object Class we have multiple classes: Object, VisualObject, ChangeableObject - Instead of one big Frame Class we have multiple Frame Classes: BaseFrame, Frame, MovableFrame, ScrollableFrame, MonitorFrame, Flexbox - Removed the Animation Object, and added a animation plugin instead - Removed the Graphic Object and merged it's functionality with the image object - Updated currently existing objects
This commit is contained in:
@@ -1,20 +1,28 @@
|
||||
## setHorizontalAlign
|
||||
|
||||
### Description
|
||||
|
||||
Sets the horizontal align of the button text
|
||||
|
||||
#### Parameters:
|
||||
### Parameters
|
||||
|
||||
1. `string` the position as string ("left", "center", "right") - default is center.
|
||||
|
||||
#### Returns:
|
||||
### Returns
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
#### Usage:
|
||||
* Sets the button's horizontal text align to right.
|
||||
### Usage
|
||||
|
||||
* Sets the button's horizontal text align to right.
|
||||
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame()
|
||||
local button = mainFrame:addButton()
|
||||
:setText("Click me!")
|
||||
:setHorizontalAlign("right")
|
||||
```
|
||||
|
||||
```xml
|
||||
<button text="Click me!" horizontalAlign="right" />
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
## setText
|
||||
|
||||
### Description
|
||||
|
||||
Sets the displayed button text
|
||||
#### Parameters:
|
||||
|
||||
### Parameters
|
||||
|
||||
1. `string` the text the button should show
|
||||
|
||||
#### Returns:
|
||||
### Returns
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
#### Usage:
|
||||
### Usage
|
||||
|
||||
* Creates a button with "Click me!" as text.
|
||||
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame()
|
||||
local button = mainFrame:addButton():setText("Click me!")
|
||||
```
|
||||
|
||||
```xml
|
||||
<button text="Click me!" />
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,14 +1,21 @@
|
||||
## setVerticalAlign
|
||||
|
||||
### Description
|
||||
|
||||
Sets the vertical align of the button text
|
||||
|
||||
#### Parameters:
|
||||
### Parameters
|
||||
|
||||
1. `string` the position as string ("top", "center", "bottom") - default is center.
|
||||
|
||||
#### Returns:
|
||||
### Returns
|
||||
|
||||
1. `object` The object in use
|
||||
|
||||
#### Usage:
|
||||
### Usage
|
||||
|
||||
* Sets the button's horizontal text align to right and the vertical text align to bottom.
|
||||
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame()
|
||||
local button = mainFrame:addButton()
|
||||
@@ -16,6 +23,7 @@ local button = mainFrame:addButton()
|
||||
:setHorizontalAlign("right")
|
||||
:setVerticalAlign("bottom")
|
||||
```
|
||||
|
||||
```xml
|
||||
<button text="Click me!" horizontalAlign="right" verticalAlign="bottom" />
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user