Docs 1.6
Accidentally uploaded outdated 1.6 docs
This commit is contained in:
30
docs/docs1_6/objects/Frame/setBar.md
Normal file
30
docs/docs1_6/objects/Frame/setBar.md
Normal file
@@ -0,0 +1,30 @@
|
||||
## setBar
|
||||
Sets the text, background, and foreground of the upper bar of the frame, accordingly.
|
||||
|
||||
#### Parameters:
|
||||
1. `string` The title text to set the bar to
|
||||
2. `number` The background color
|
||||
2. `number` The foreground color
|
||||
|
||||
#### Returns:
|
||||
1. `frame` The frame being used
|
||||
|
||||
#### Usage:
|
||||
* Set the title to "My first frame!", with a background of black and a foreground of light gray.
|
||||
```lua
|
||||
frame:setBar("My first Frame!", colors.black, colors.lightGray)
|
||||
```
|
||||
* Store the frame, use the named frame variable after assigning.
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame()
|
||||
local myFrame = MainFrame:addFrame()
|
||||
myFrame:setBar("My first Frame!")
|
||||
```
|
||||
* This abuses the call-chaining that Basalt uses.
|
||||
```lua
|
||||
local mainFrame = basalt.createFrame()
|
||||
local myFrame = mainFrame:addFrame():setBar("My first Frame!")
|
||||
```
|
||||
```xml
|
||||
<frame barText="My first Frame!" barBG="black" barFG="lightGray"></frame>
|
||||
```
|
||||
Reference in New Issue
Block a user