|
|
@ -403,11 +403,15 @@ StockpilesOverlay.ATTRS{
|
|
|
|
function StockpilesOverlay:init()
|
|
|
|
function StockpilesOverlay:init()
|
|
|
|
self.minimized = false
|
|
|
|
self.minimized = false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local function is_expanded()
|
|
|
|
|
|
|
|
return not self.minimized
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
local main_panel = widgets.Panel{
|
|
|
|
local main_panel = widgets.Panel{
|
|
|
|
view_id='main',
|
|
|
|
view_id='main',
|
|
|
|
frame_style=gui.MEDIUM_FRAME,
|
|
|
|
frame_style=gui.MEDIUM_FRAME,
|
|
|
|
frame_background=gui.CLEAR_PEN,
|
|
|
|
frame_background=gui.CLEAR_PEN,
|
|
|
|
visible=function() return not self.minimized end,
|
|
|
|
visible=is_expanded,
|
|
|
|
subviews={
|
|
|
|
subviews={
|
|
|
|
-- widgets.HotkeyLabel{
|
|
|
|
-- widgets.HotkeyLabel{
|
|
|
|
-- frame={t=0, l=0},
|
|
|
|
-- frame={t=0, l=0},
|
|
|
@ -486,10 +490,12 @@ function StockpilesOverlay:init()
|
|
|
|
widgets.ConfigureButton{
|
|
|
|
widgets.ConfigureButton{
|
|
|
|
frame={t=0, r=5},
|
|
|
|
frame={t=0, r=5},
|
|
|
|
on_click=function() ConfigModal{on_close=self:callback('on_custom_config')}:show() end,
|
|
|
|
on_click=function() ConfigModal{on_close=self:callback('on_custom_config')}:show() end,
|
|
|
|
|
|
|
|
visible=is_expanded,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
widgets.HelpButton{
|
|
|
|
widgets.HelpButton{
|
|
|
|
frame={t=0, r=1},
|
|
|
|
frame={t=0, r=1},
|
|
|
|
command='stockpiles',
|
|
|
|
command='stockpiles',
|
|
|
|
|
|
|
|
visible=is_expanded,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end
|
|
|
|