|
|
@ -106,10 +106,14 @@ function registerSidebar(shop_name,callback)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
local function drawSidebar( wshop )
|
|
|
|
local function drawSidebar( wshop )
|
|
|
|
local valid_focus="dwarfmode/QueryBuilding"
|
|
|
|
local valid_focus="dwarfmode/QueryBuilding"
|
|
|
|
|
|
|
|
local another_overlay="dfhack/lua/WorkshopOverlay"
|
|
|
|
if wshop:getMaxBuildStage()==wshop:getBuildStage() then
|
|
|
|
if wshop:getMaxBuildStage()==wshop:getBuildStage() then
|
|
|
|
local sidebar=callback{workshop=wshop}
|
|
|
|
local sidebar=callback{workshop=wshop}
|
|
|
|
if string.sub(dfhack.gui.getCurFocus(),1,#valid_focus)==valid_focus then
|
|
|
|
if string.sub(dfhack.gui.getCurFocus(true),1,#another_overlay)==another_overlay then
|
|
|
|
sidebar:show()
|
|
|
|
dfhack.screen.dismiss(dfhack.gui.getCurViewscreen(true))
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
if string.sub(dfhack.gui.getCurFocus(true),1,#valid_focus)==valid_focus then
|
|
|
|
|
|
|
|
sidebar:show(dfhack.gui.getCurViewscreen(true))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|