- Created Plugin loading system

- Added lazy loading system for elements (optional feature)
- Improved rendering performance
- Added ID system which is separated from Eement Names
- Added Focussystem for container
- Improved container performance by only rendering and handling events from visible childrens instead of all
- Added label and input
- Added animation and xml
This commit is contained in:
Robert Jelic
2025-02-13 10:51:12 +01:00
parent bca8889fbd
commit 6dfa554523
23 changed files with 1833 additions and 494 deletions

View File

@@ -1,18 +1,28 @@
local Container = require("elements/Container")
local elementManager = require("elementManager")
local Container = elementManager.getElement("Container")
---@class Frame : Container
local Frame = setmetatable({}, Container)
Frame.__index = Frame
function Frame.new(id, basalt)
--- Creates a new Frame instance
--- @param props table The properties to initialize the element with
--- @param basalt table The basalt instance
--- @return Frame object The newly created Frame instance
--- @usage local element = Frame.new("myId", basalt)
function Frame.new(props, basalt)
local self = setmetatable({}, Frame):__init()
self:init(id, basalt)
self:init(props, basalt)
self.set("width", 12)
self.set("height", 6)
self.set("background", colors.blue)
self.set("type", "Frame")
self.set("z", 10)
return self
end
function Frame:init(props, basalt)
Container.init(self, props, basalt)
self.set("type", "Frame")
end
return Frame