Docs: basalt.getVariable & basalt.getVersion

This commit is contained in:
Erb3
2022-09-12 21:04:01 +02:00
parent 7bcbafe30b
commit 651690d8ab
2 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
# basalt.getVariable
Returns a variable defined with [setVariable](objects/Basalt/setVariable)
## Returns
1. `variable` The variable stored
## Usage
* Displays the stored variable in the debug console
```lua
basalt.setVariable("abc", function()
basalt.debug("I got clicked")
return 1
end)
basalt.debug(basalt.getVariable("abc")()) -- Should debug log "I got clicked" and debug log 2 (which was returned from the function)
```
```xml
<button onClick="abc" text="Click me" />
```

View File

@@ -0,0 +1,15 @@
# basalt.getVersion
Returns the currently active/visible base frame.
## Returns
1. `string` The current version of Basalt
## Usage
* Displays the version of Basalt in the debug console
```lua
basalt.debug(basalt.getVersion()) -- Example: 1.6.2
```