Files
Basalt2/src/elements/Frame.lua
Robert Jelic cc7b2de51a Update
Lots of fixes and improvements
2025-02-16 14:33:07 +01:00

25 lines
672 B
Lua

local elementManager = require("elementManager")
local Container = elementManager.getElement("Container")
---@class Frame : Container
local Frame = setmetatable({}, Container)
Frame.__index = Frame
--- Creates a new Frame instance
--- @return Frame object The newly created Frame instance
--- @usage local element = Frame.new("myId", basalt)
function Frame.new()
local self = setmetatable({}, Frame):__init()
self.set("width", 12)
self.set("height", 6)
self.set("background", colors.gray)
self.set("z", 10)
return self
end
function Frame:init(props, basalt)
Container.init(self, props, basalt)
self.set("type", "Frame")
end
return Frame