432 B
432 B
Basalt
setVariable
This stores a variable which you're able to access via xml. You are also able to add a function, which then gets called by object events created in XML.
Parameters
stringa key nameanyany variable
Usage
- Adds a function to basalt.
basalt.setVariable("clickMe", function()
basalt.debug("I got clicked")
end)
<button onClick="clickMe" text="Click me" />