Docs update, mostly Basalt, Sidebar and Footer. #28

Merged
piprett merged 30 commits from master into master 2022-09-17 21:04:41 +08:00
Showing only changes of commit 4f1baee771 - Show all commits

View File

@@ -1,17 +1,36 @@
## basalt.removeFrame
Removes the base frame by it's id. This only works for base-frames.
#### Parameters:
1. `string` id
# basalt.removeFrame
Removes the base frame by it's id. **This only works for base-frames.**
## Parameters
1. `string` id - ID of the base-frame.
## Usage
* Removes the previously created frame with id "secondBaseFrame"
The frame id is gotten from a frame variable's `:getName()`
#### Usage:
* Removes the previously created frame with id "myFirstFrame"
```lua
local main = basalt.createFrame("firstBaseFrame")
local main2 = basalt.createFrame("secondBaseFrame")
main:addButton()
:setText("Remove")
:onClick(function()
basalt.removeFrame(main2:getName()) -- you can use main2:getName() to find out the id or just use "secondBaseFrame"
basalt.removeFrame(main2:getName())
end)
```
```
* Removes the previously created frame with id "secondBaseFrame", without frame stored in variable
The frame id is the frame's name
```lua
local main = basalt.createFrame("firstBaseFrame")
local main2 = basalt.createFrame("secondBaseFrame")
main:addButton()
:setText("Remove")
:onClick(function()
basalt.removeFrame("secondBaseFrame")
end)
```