diff --git a/index.html b/index.html new file mode 100644 index 0000000..5fe04d0 --- /dev/null +++ b/index.html @@ -0,0 +1,414 @@ + + + + + Basalt Documentation + + + + +
+ +
+ +
+
+
+ + +
+ + + + + + +
+ +

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.

+

Usage:

+
    +
    local basalt = require("basalt")
    +local mainFrame = basalt.createFrame()
    +mainFrame:show()
    +basalt.run()
    +
    +
+ + +

Class Basalt

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
basalt:create (type, id)Creates and returns a new UI element of the specified type
basalt:createFrame ()Creates and returns a new frame
basalt:getElementManager ()Returns the element manager instance
basalt:getMainFrame ()Gets or creates the main frame
basalt:setActiveFrame (frame)Sets the active frame
basalt:scheduleUpdate (func)Schedules a function to be updated
basalt:removeSchedule (id)Removes a scheduled update
basalt.updateEvent (event, ...)Internal event handler
basalt.renderFrames ()Internal render function
basalt:update ()Updates all scheduled functions
basalt:stop ()Stops the Basalt runtime
basalt:run (isActive)Starts the Basalt runtime
+ +
+
+ + +

Class Basalt

+ +
+ The main Basalt instance + Contains all core functionality and management functions +
+
+
+ + basalt:create (type, id) +
+
+ Creates and returns a new UI element of the specified type + + +

Parameters:

+
    +
  • type + string The type of element to create (e.g. "Button", "Label", "BaseFrame") +
  • +
  • id + ? string Optional unique identifier for the element +
  • +
+ +

Returns:

+
    + + table element The created element instance +
+ + + +

Usage:

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

Returns:

+
    + + table BaseFrame The created frame instance +
+ + + +

Usage:

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

Returns:

+
    + + table ElementManager The element manager +
+ + + +

Usage:

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

Returns:

+
    + + BaseFrame table The main frame instance +
+ + + +

Usage:

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

Parameters:

+
    +
  • frame + table The frame to set as active +
  • +
+ + + + +

Usage:

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

Parameters:

+
    +
  • func + function The function to schedule +
  • +
+ +

Returns:

+
    + + number Id The schedule ID +
+ + + +

Usage:

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

Parameters:

+
    +
  • id + number The schedule ID to remove +
  • +
+ + + + +

Usage:

+
    +
    basalt.removeSchedule(scheduleId)
    +
+ +
+
+ + basalt.updateEvent (event, ...) +
+
+ Internal event handler + + +

Parameters:

+
    +
  • event + + + +
  • +
  • ... + + + +
  • +
+ + + + + +
+
+ + 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 + + +

Parameters:

+
    +
  • isActive + boolean Whether to start active (default: true) +
  • +
+ + + + +

Usage:

+
    +
  • basalt.run()
  • +
  • basalt.run(false)
  • +
+ +
+
+ + +
+
+
+generated by LDoc 1.5.0 +Last updated 2025-02-09 18:29:17 +
+
+ + diff --git a/index.md b/index.md deleted file mode 100644 index 1c79cee..0000000 --- a/index.md +++ /dev/null @@ -1,266 +0,0 @@ - - - - - Basalt Documentation - - - - -
- -
- -
-
-
- -
- - - - - - - - -
- - -

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)
    -
  • -
- -
-
- - -
-
-
-
-
- -