Skip to content
Robert Jelic edited this page May 6, 2022 · 7 revisions

Basalt is managing all the things.

To start using Basalt you have to do the following line of code:

local basalt = dofile("basalt.lua")

remember you need the basalt.lua file on your computer!

Now you are able to call all these functions:

basalt.createFrame

create a frame without a parent

local mainFrame = basalt.createFrame("myFirstFrame"):show()

parameters: string name
returns: new frame object

basalt.removeFrame

removes a frame (only possible for non-parent frames)

local mainFrame = basalt.createFrame("myFirstFrame"):show()
basalt.removeFrame("myFirstFrame")

parameters: string name
returns:-

basalt.getFrame

With that function you can get frames, but only frames without a parent!

basalt.createFrame("myFirstFrame")
basalt.getFrame("myFirstFrame"):show()

parameters: string name
returns: frame object

basalt.getActiveFrame

returns the currently active (without a parent) frame

basalt.createFrame("myFirstFrame"):show()
basalt.debug(basalt.getActiveFrame():getName()) -- returns myFirstFrame

parameters: -
returns: frame object

basalt.autoUpdate

starts the draw and event handler until you use basalt.stopUpdate

local mainFrame = basalt.createFrame("myFirstFrame"):show()
basalt.autoUpdate()

parameters: -
returns:-

basalt.update

calls the draw and event handler method once

local mainFrame = basalt.createFrame("myFirstFrame"):show()
basalt.autoUpdate()

parameters: string event, ... (you can use some paramters here. you dont have to pass any paramters )
returns:-

basalt.stopUpdate

stops the draw and event handler

basalt.stopUpdate()

parameters: -
returns:-

basalt.debug

creates a label with some information on the main frame on the bottom left, if you click on that label it will open a log view for you see it as the new print for debugging

basalt.debug("Hi i am cute")

parameters: ... (multiple parameters are possible, like print does)
returns:-