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
2 changed files with 25 additions and 13 deletions
Showing only changes of commit 72f2c527b9 - Show all commits

View File

@@ -1,11 +1,16 @@
## basalt.getActiveFrame
Returns the currently active/visible base frame
#### Returns: # basalt.getActiveFrame
Returns the currently active/visible base frame.
## Returns
1. `frame` The current frame 1. `frame` The current frame
#### Usage: ## Usage
* Displays the active frame name in the debug console * Displays the active frame name in the debug console
```lua ```lua
local main = basalt.createFrame() local main = basalt.createFrame()
basalt.debug(basalt.getActiveFrame():getName()) -- returns the id basalt.debug(basalt.getActiveFrame():getName()) -- returns the id

View File

@@ -1,14 +1,20 @@
## basalt.getFrame
Returns a base frame by the given id
#### Parameters: # basalt.getFrame
Returns a base frame by the given id.
## Parameters
1. `string` id 1. `string` id
#### Returns: ## Returns
1. `frame` object
1. `frame` The frame with the supplied id.
## Usage
#### Usage:
* Creates, fetches and shows the "myFirstFrame" object * Creates, fetches and shows the "myFirstFrame" object
```lua ```lua
local main = basalt.createFrame("firstBaseFrame") local main = basalt.createFrame("firstBaseFrame")
local main2 = basalt.createFrame("secondBaseFrame") local main2 = basalt.createFrame("secondBaseFrame")
@@ -20,4 +26,5 @@ main:addButton()
frame2:show() frame2:show()
end end
end) end)
basalt.autoUpdate()
``` ```