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:
Axel Meyer
2026-06-14 02:36:40 +02:00
parent 99f3583e91
commit e310494d39

View File

@@ -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