|
|
@ -720,12 +720,18 @@ function ZScreen:dismiss()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
local NO_LOGIC_SCREENS = utils.invert{
|
|
|
|
local NO_LOGIC_SCREENS = {
|
|
|
|
'viewscreen_loadgamest',
|
|
|
|
'viewscreen_loadgamest',
|
|
|
|
'viewscreen_export_regionst',
|
|
|
|
'viewscreen_export_regionst',
|
|
|
|
'viewscreen_choose_game_typest',
|
|
|
|
'viewscreen_choose_game_typest',
|
|
|
|
'viewscreen_worldst',
|
|
|
|
'viewscreen_worldst',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for _,v in ipairs(NO_LOGIC_SCREENS) do
|
|
|
|
|
|
|
|
if not df[v] then
|
|
|
|
|
|
|
|
error('invalid class name: ' .. v)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
NO_LOGIC_SCREENS[df[v]] = true
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
-- this is necessary for middle-click map scrolling to function
|
|
|
|
-- this is necessary for middle-click map scrolling to function
|
|
|
|
function ZScreen:onIdle()
|
|
|
|
function ZScreen:onIdle()
|
|
|
@ -733,8 +739,8 @@ function ZScreen:onIdle()
|
|
|
|
df.global.pause_state = true
|
|
|
|
df.global.pause_state = true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
if self._native and self._native.parent then
|
|
|
|
if self._native and self._native.parent then
|
|
|
|
local vs_name = getmetatable(dfhack.gui.getDFViewscreen(true))
|
|
|
|
local vs_type = dfhack.gui.getDFViewscreen(true)._type
|
|
|
|
if NO_LOGIC_SCREENS[vs_name] then
|
|
|
|
if NO_LOGIC_SCREENS[vs_type] then
|
|
|
|
self.force_pause = true
|
|
|
|
self.force_pause = true
|
|
|
|
self.pass_movement_keys = false
|
|
|
|
self.pass_movement_keys = false
|
|
|
|
self.pass_mouse_clicks = false
|
|
|
|
self.pass_mouse_clicks = false
|
|
|
|