fix(vagrant): ESC closes open panel before quitting to launcher
Previously ESC unconditionally switched to the launcher, leaving no way to dismiss an open inspect-detail (or any panel-widget opened via notify.post without a toggle key). Now ESC closes the active panel first; only when no panel is open does it quit to the launcher.
This commit is contained in:
9
init.lua
9
init.lua
@@ -552,8 +552,13 @@ end
|
|||||||
|
|
||||||
function M.update(ctx, dt)
|
function M.update(ctx, dt)
|
||||||
if input.was_action_pressed("quit_to_launcher") then
|
if input.was_action_pressed("quit_to_launcher") then
|
||||||
engine.switch_module("lib-management.launcher")
|
-- ESC: close any open panel first; only quit to launcher when no panel is open.
|
||||||
return
|
if panel.is_open() then
|
||||||
|
panel.close()
|
||||||
|
else
|
||||||
|
engine.switch_module("lib-management.launcher")
|
||||||
|
return
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Inventory panel input handling
|
-- Inventory panel input handling
|
||||||
|
|||||||
Reference in New Issue
Block a user