Add core library and element classes for Basalt framework

This commit is contained in:
Robert Jelic
2025-02-09 13:40:17 +01:00
parent acc5949085
commit 1d31fb8d0c
16 changed files with 1329 additions and 0 deletions

18
src/elements/Frame.lua Normal file
View File

@@ -0,0 +1,18 @@
local Container = require("elements/Container")
local Frame = setmetatable({}, Container)
Frame.__index = Frame
---@diagnostic disable-next-line: duplicate-set-field
function Frame.new(id, basalt)
local self = setmetatable({}, Frame):__init()
self:init(id, 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
return Frame