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:
5
init.lua
5
init.lua
@@ -552,9 +552,14 @@ 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
|
||||||
|
-- ESC: close any open panel first; only quit to launcher when no panel is open.
|
||||||
|
if panel.is_open() then
|
||||||
|
panel.close()
|
||||||
|
else
|
||||||
engine.switch_module("lib-management.launcher")
|
engine.switch_module("lib-management.launcher")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Inventory panel input handling
|
-- Inventory panel input handling
|
||||||
panel.update(dt)
|
panel.update(dt)
|
||||||
|
|||||||
Reference in New Issue
Block a user