Accidentally uploaded outdated 1.6 docs
This commit is contained in:
Robert Jelic
2023-05-01 16:28:46 +02:00
parent 92b93a3862
commit d4c72514ef
265 changed files with 25608 additions and 3867 deletions

View File

@@ -1,11 +1,10 @@
Panes are very simple sizeable background objects.
Panes are here to do some visual background modifying, without listening (by default) to any events.
The following list is only available to panes: <br>
Remember Pane also inherits from [Object](objects/Object.md)
Because panes don't have any unique functionality, there is also no method list for them.
Pane doesn't have any custom functionallity. If you want to change the color/position or size, just check out the [object](https://github.com/NoryiE/basalt/wiki/Object) wikipage.
[Object](objects/Object.md) methods also apply for panes.
## Example:
## Example
```lua
local mainFrame = basalt.createFrame()
@@ -14,6 +13,29 @@ aPane:setSize(30, 10)
aPane:setBackground(colors.yellow)
aPane:show()
```
```xml
<pane width="30" height="10" bg="yellow" />
```
```
### Other examples
!["pane-example-1"](../_media/pane-example-1.png)
```lua
main:addPane():setSize(15, 8):setPosition(2, 2):setBackground(colors.red)
main:addPane():setSize(15, 8):setPosition(18, 2):setBackground(colors.blue, "#")
main:addPane():setSize(15, 8):setPosition(17 * 2, 2):setBackground(colors.green, "#", colors.orange)
```
You could also create a 1-line height pane with dynamic width:
!["pane-example-2"](../_media/pane-example-2.png)
```lua
main:addPane():setSize("parent.w - 2", 1):setPosition(2, 2):setBackground(false, "\140", colors.blue)
main:addPane():setSize("parent.w - 2", 1):setPosition(2, 4):setBackground(colors.black, "\45", colors.red)
main:addPane():setSize("parent.w - 2", 1):setPosition(2, 6):setBackground(false, "\183", colors.purple)
```
You can also do that in y instead of x direction.