Files
Basalt/source/project/objects/Pane.lua
Robert Jelic b0b104ee82 couple of bugfixes
-fixed screen flickering
-fixed menubar (now works as intended)
-reworked sliders (behaviour more like scrollbars)
-visual fix to dropdowns
2022-06-06 17:06:56 +02:00

25 lines
713 B
Lua

local function Pane(name)
-- Pane
local base = Object(name)
local objectType = "Pane"
local object = {
getType = function(self)
return objectType
end;
draw = function(self)
if (base.draw(self)) then
if (self.parent ~= nil) then
local obx, oby = self:getAnchorPosition()
self.parent:drawBackgroundBox(obx, oby, self.width, self.height, self.bgColor)
self.parent:drawForegroundBox(obx, oby, self.width, self.height, self.bgColor)
end
self:setVisualChanged(false)
end
end;
}
return setmetatable(object, base)
end