Some docs updates
This commit is contained in:
5
docs/objects/Scrollbar/getIndex.md
Normal file
5
docs/objects/Scrollbar/getIndex.md
Normal file
@@ -0,0 +1,5 @@
|
||||
## getIndex
|
||||
Returns the current index
|
||||
|
||||
#### Returns:
|
||||
1. `number` index
|
||||
18
docs/objects/Scrollbar/setBackgroundSymbol.md
Normal file
18
docs/objects/Scrollbar/setBackgroundSymbol.md
Normal file
@@ -0,0 +1,18 @@
|
||||
## setBackgroundSymbol
|
||||
Changes the symbol in the background, default is "\127"
|
||||
|
||||
#### Parameters:
|
||||
1. `string` symbol
|
||||
|
||||
#### Returns:
|
||||
1. `object` The object in use
|
||||
|
||||
#### Usage:
|
||||
* Creates a new scrollbar and changes the background symbol to X
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local scrollbar = main:addScrollbar():setBackgroundSymbol("X")
|
||||
```
|
||||
```xml
|
||||
<scrollbar backgroundSymbol="X" />
|
||||
```
|
||||
18
docs/objects/Scrollbar/setBarType.md
Normal file
18
docs/objects/Scrollbar/setBarType.md
Normal file
@@ -0,0 +1,18 @@
|
||||
## setBarType
|
||||
Changes the scrollbar to be vertical or horizontal, default is vertical
|
||||
|
||||
#### Parameters:
|
||||
1. `string` vertical or horizontal
|
||||
|
||||
#### Returns:
|
||||
1. `object` The object in use
|
||||
|
||||
#### Usage:
|
||||
* Creates a new scrollbar and changes the bar type to horizontal
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local scrollbar = main:addScrollbar():setBarType("horizontal")
|
||||
```
|
||||
```xml
|
||||
<scrollbar barType="horizontal" />
|
||||
```
|
||||
21
docs/objects/Scrollbar/setIndex.md
Normal file
21
docs/objects/Scrollbar/setIndex.md
Normal file
@@ -0,0 +1,21 @@
|
||||
## setIndex
|
||||
Changes the current index to your choice, for example you could create a button which scrolls up to 1 by using :setIndex(1)
|
||||
|
||||
#### Parameters:
|
||||
1. `number` the index
|
||||
|
||||
#### Returns:
|
||||
1. `object` The object in use
|
||||
|
||||
#### Usage:
|
||||
* Creates a new scrollbar and changes the index to 1 as soon as the button got clicked
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local scrollbar = main:addScrollbar():setMaxValue(20)
|
||||
local button = main:addButton(function()
|
||||
scrollbar:setIndex(1)
|
||||
end)
|
||||
```
|
||||
```xml
|
||||
<scrollbar index="2" />
|
||||
```
|
||||
18
docs/objects/Scrollbar/setMaxValue.md
Normal file
18
docs/objects/Scrollbar/setMaxValue.md
Normal file
@@ -0,0 +1,18 @@
|
||||
## setMaxValue
|
||||
the default max value is always the width (if horizontal) or height (if vertical), if you change the max value the bar will always calculate the value based on its width or height - example: you set the max value to 100, the height is 10 and it is a vertical bar, this means if the bar is on top, the value is 10, if the bar goes one below, it is 20 and so on.
|
||||
|
||||
#### Parameters:
|
||||
1. `number` maximum
|
||||
|
||||
#### Returns:
|
||||
1. `object` The object in use
|
||||
|
||||
#### Usage:
|
||||
* Creates a new scrollbar and changes the max value to 20
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local scrollbar = main:addScrollbar():setMaxValue(20)
|
||||
```
|
||||
```xml
|
||||
<scrollbar maxValue="20" />
|
||||
```
|
||||
18
docs/objects/Scrollbar/setSymbol.md
Normal file
18
docs/objects/Scrollbar/setSymbol.md
Normal file
@@ -0,0 +1,18 @@
|
||||
## setSymbol
|
||||
Changes the scrollbar symbol, default is " "
|
||||
|
||||
#### Parameters:
|
||||
1. `string` symbol
|
||||
|
||||
#### Returns:
|
||||
1. `object` The object in use
|
||||
|
||||
#### Usage:
|
||||
* Creates a new scrollbar and changes the symbol to X
|
||||
```lua
|
||||
local main = basalt.createFrame()
|
||||
local scrollbar = main:addScrollbar():setSymbol("X")
|
||||
```
|
||||
```xml
|
||||
<scrollbar symbol="X" />
|
||||
```
|
||||
Reference in New Issue
Block a user