add gui.get_active_frame, set_active_frame & update cursor lock behavior

This commit is contained in:
MihailRis 2026-02-06 14:16:30 +03:00
parent 463098aa1e
commit 8468ab184d
11 changed files with 123 additions and 50 deletions

View file

@ -232,6 +232,7 @@ _GUI_ROOT = Document.new("core:root")
_MENU = _GUI_ROOT.menu
menu = _MENU
gui.root = _GUI_ROOT
gui.main_frame_id = "core:main"
do
local status, err = pcall(function()
@ -435,6 +436,7 @@ function __vc_on_hud_open()
if menu.page ~= "" then
if not menu:back() then
menu:reset()
gui.set_active_frame("")
end
elseif hud.is_inventory_open() then
hud.close_inventory()