|
|
@ -443,11 +443,7 @@ MenuOverlay.ATTRS {
|
|
|
|
sidebar_mode = DEFAULT_NIL,
|
|
|
|
sidebar_mode = DEFAULT_NIL,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function MenuOverlay:computeFrame(parent_rect)
|
|
|
|
function MenuOverlay:init()
|
|
|
|
return self.df_layout.menu, gui.inset_frame(self.df_layout.menu, self.frame_inset)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function MenuOverlay:onAboutToShow(parent)
|
|
|
|
|
|
|
|
if not dfhack.isMapLoaded() then
|
|
|
|
if not dfhack.isMapLoaded() then
|
|
|
|
-- sidebar menus are only valid when a fort map is loaded
|
|
|
|
-- sidebar menus are only valid when a fort map is loaded
|
|
|
|
error('A fortress map must be loaded.')
|
|
|
|
error('A fortress map must be loaded.')
|
|
|
@ -471,7 +467,13 @@ function MenuOverlay:onAboutToShow(parent)
|
|
|
|
|
|
|
|
|
|
|
|
enterSidebarMode(self.sidebar_mode)
|
|
|
|
enterSidebarMode(self.sidebar_mode)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function MenuOverlay:computeFrame(parent_rect)
|
|
|
|
|
|
|
|
return self.df_layout.menu, gui.inset_frame(self.df_layout.menu, self.frame_inset)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function MenuOverlay:onAboutToShow(parent)
|
|
|
|
self:updateLayout()
|
|
|
|
self:updateLayout()
|
|
|
|
if not self.df_layout.menu then
|
|
|
|
if not self.df_layout.menu then
|
|
|
|
error("The menu panel of dwarfmode is not visible")
|
|
|
|
error("The menu panel of dwarfmode is not visible")
|
|
|
|