diff --git a/init.lua b/init.lua index 10d4865..beb2689 100644 --- a/init.lua +++ b/init.lua @@ -552,8 +552,13 @@ end function M.update(ctx, dt) if input.was_action_pressed("quit_to_launcher") then - engine.switch_module("lib-management.launcher") - return + -- 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") + return + end end -- Inventory panel input handling