- 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:
@@ -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
|
||||
Reference in New Issue
Block a user