32 lines
1.2 KiB
Lua
32 lines
1.2 KiB
Lua
local Widget = require 'Widget'
|
|
local FillRect = require 'FillRect'
|
|
|
|
local left = Widget.Panel{
|
|
x = CONSTRUCTION_GLOBAL.LEFT_X - CONSTRUCTION_GLOBAL.PANEL_MARGIN_X,
|
|
y = CONSTRUCTION_GLOBAL.TOP_Y - CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y,
|
|
width = CONSTRUCTION_GLOBAL.SECTION_WIDTH + CONSTRUCTION_GLOBAL.PANEL_MARGIN_X * 2,
|
|
height = CONSTRUCTION_GLOBAL.SIDE_HEIGHT + CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y * 2,
|
|
}
|
|
local center = Widget.Panel{
|
|
x = CONSTRUCTION_GLOBAL.CENTER_LEFT_X - CONSTRUCTION_GLOBAL.PANEL_MARGIN_X,
|
|
y = CONSTRUCTION_GLOBAL.TOP_Y - CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y,
|
|
width = CONSTRUCTION_GLOBAL.CENTER_WIDTH + CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y * 2 + CONSTRUCTION_GLOBAL.CENTER_PAD,
|
|
height = CONSTRUCTION_GLOBAL.CENTER_HEIGHT + CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y * 2,
|
|
}
|
|
local right = Widget.Panel{
|
|
x = CONSTRUCTION_GLOBAL.RIGHT_X - CONSTRUCTION_GLOBAL.PANEL_MARGIN_X,
|
|
y = CONSTRUCTION_GLOBAL.TOP_Y - CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y,
|
|
width = CONSTRUCTION_GLOBAL.SECTION_WIDTH + CONSTRUCTION_GLOBAL.PANEL_MARGIN_X * 2,
|
|
height = CONSTRUCTION_GLOBAL.SIDE_HEIGHT + CONSTRUCTION_GLOBAL.PANEL_MARGIN_Y * 2,
|
|
}
|
|
|
|
Widget = nil
|
|
|
|
local draw = function(cr)
|
|
FillRect.draw(left, cr)
|
|
FillRect.draw(center, cr)
|
|
FillRect.draw(right, cr)
|
|
end
|
|
|
|
return draw
|