feat: go back in menu on Escape pressed

This commit is contained in:
MihailRis
2025-11-05 02:13:32 +03:00
parent 7b45b4083b
commit c565e9897f
3 changed files with 13 additions and 2 deletions
+3 -1
View File
@@ -441,7 +441,9 @@ function __vc_on_hud_open()
end)
input.add_callback("key:escape", function()
if menu.page ~= "" then
menu:reset()
if not menu:back() then
menu:reset()
end
elseif hud.is_inventory_open() then
hud.close_inventory()
else