Files
Basalt/Basalt/objects/Pane.lua
Robert Jelic b940ef7154 added new features
-remade animation
-added xml support
-finished dynamic values
-added new object: graphic
-added themes for frames
-textfield got some basic improvements to create coding editors
2022-07-17 19:20:02 +02:00

32 lines
911 B
Lua

local Object = require("Object")
return function(name)
-- Pane
local base = Object(name)
local objectType = "Pane"
local object = {
init = function(self)
self.bgColor = self.parent:getTheme("PaneBG")
self.fgColor = self.parent:getTheme("PaneBG")
end,
getType = function(self)
return objectType
end;
draw = function(self)
if (base.draw(self)) then
if (self.parent ~= nil) then
local obx, oby = self:getAnchorPosition()
local w,h = self:getSize()
self.parent:drawBackgroundBox(obx, oby, w, h, self.bgColor)
self.parent:drawForegroundBox(obx, oby, w, h, self.fgColor)
end
self:setVisualChanged(false)
end
end;
}
return setmetatable(object, base)
end