From fb8844108ef71ea44aabf732aaa05addd0c23a24 Mon Sep 17 00:00:00 2001 From: Robert Jelic Date: Sun, 9 Feb 2025 17:51:45 +0100 Subject: [PATCH] Test --- src/main.lua | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/src/main.lua b/src/main.lua index a237b1a..42b131e 100644 --- a/src/main.lua +++ b/src/main.lua @@ -2,11 +2,6 @@ -- This is the main entry point for the Basalt UI Framework. -- It provides functions for creating and managing UI elements and handling events. -- @module basalt --- @author NyoriE --- @license MIT --- @copyright 2025 --- @release 2.0 --- @see elementManager -- @usage -- local basalt = require("basalt") -- local mainFrame = basalt.createFrame() @@ -35,16 +30,11 @@ basalt.LOGGER = require("log") local mainFrame = nil local updaterActive = false ---- Creates a new UI element --- Creates and returns a new UI element of the specified type --- @function create --- @param type string The type of element to create (e.g. "Button", "Label", "BaseFrame") --- @param[opt] id string Optional unique identifier for the element --- @treturn table The created element instance --- @see elementManager.getElement --- @usage --- local button = basalt.create("Button", "myButton") --- button:setPosition(5, 5) +--- Creates and returns a new UI element of the specified type +--- @param type string The type of element to create (e.g. "Button", "Label", "BaseFrame") +--- @param id? string Optional unique identifier for the element +--- @return table element The created element instance +--- @usage local button = basalt.create("Button") function basalt.create(type, id) if(id==nil)then id = elementManager.generateId() end local element = elementManager.getElement(type).new(id, basalt) @@ -56,9 +46,8 @@ function basalt.create(type, id) end --- Creates and returns a new frame --- @function createFrame --- @return table The created frame instance --- @usage local mainFrame = basalt.createFrame() +--- @return table BaseFrame The created frame instance +--- @usage local mainFrame = basalt.createFrame() function basalt.createFrame() local frame = basalt.create("BaseFrame") mainFrame = frame