Revert "fix(web/radial): go back to correct more page when going back from sub"

This reverts commit 709d512422.
This commit is contained in:
Luke
2023-02-25 15:37:13 +01:00
parent 6e1a978038
commit 60e3a12033
2 changed files with 14 additions and 26 deletions

View File

@@ -24,9 +24,6 @@ local menuHistory = {}
---@type RadialMenuProps?
local currentRadial = nil
---@type number | nil
local menuPage = nil
---Open a the global radial menu or a registered radial submenu with the given id.
---@param id string?
local function showRadial(id)
@@ -116,7 +113,7 @@ function lib.hideRadial()
SendNUIMessage({
action = 'openRadialMenu',
data = menuPage or false
data = false
})
SetNuiFocus(false, false)
@@ -244,12 +241,9 @@ lib.addKeybind({
defaultKey = 'z',
onPressed = function()
if isOpen then
menuPage = 1
return lib.hideRadial()
end
menuPage = nil
if #menuItems == 0 or IsNuiFocused() or IsPauseMenuActive() then return end
isOpen = true