Module basalt

Basalt UI Framework main module.

This is the main entry point for the Basalt UI Framework. It provides functions for creating and managing UI elements and handling events.



basalt:create (type, id)
Creates and returns a new UI element of the specified type

Usage:

    local button = basalt.create("Button")
    
basalt:createFrame ()
Creates and returns a new frame

Usage:

    local mainFrame = basalt.createFrame()
    
basalt:getElementManager ()
Returns the element manager instance

Usage:

    local manager = basalt.getElementManager()
    
basalt:getMainFrame ()
Gets or creates the main frame

Usage:

    local frame = basalt.getMainFrame()
    
basalt:setActiveFrame (frame)
Sets the active frame

Usage:

    basalt.setActiveFrame(myFrame)
    
basalt:scheduleUpdate (func)
Schedules a function to be updated

Usage:

    local id = basalt.scheduleUpdate(myFunction)
    
basalt:removeSchedule (id)
Removes a scheduled update

Usage:

    basalt.removeSchedule(scheduleId)
    
basalt.updateEvent
Internal event handler
basalt.renderFrames
Internal render function
basalt:update ()
Updates all scheduled functions

Usage:

    basalt.update()
    
basalt:stop ()
Stops the Basalt runtime

Usage:

    basalt.stop()
    
basalt:run (isActive)
Starts the Basalt runtime

Usage:

  • basalt.run()
    
  • basalt.run(false)