mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
Revert "fix(web/radial): go back to correct more page when going back from sub"
This reverts commit 709d512422.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user