mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-18 15:36:02 +01:00
refactor(client/radial): change keybind to toggle
This commit is contained in:
@@ -149,7 +149,11 @@ lib.addKeybind({
|
|||||||
description = 'Open radial menu',
|
description = 'Open radial menu',
|
||||||
defaultKey = 'z',
|
defaultKey = 'z',
|
||||||
onPressed = function()
|
onPressed = function()
|
||||||
if isOpen or #menuItems == 0 or IsNuiFocused() or IsPauseMenuActive() then return end
|
if isOpen then
|
||||||
|
return lib.hideRadial()
|
||||||
|
end
|
||||||
|
|
||||||
|
if #menuItems == 0 or IsNuiFocused() or IsPauseMenuActive() then return end
|
||||||
|
|
||||||
isOpen = true
|
isOpen = true
|
||||||
|
|
||||||
@@ -170,7 +174,7 @@ lib.addKeybind({
|
|||||||
Wait(0)
|
Wait(0)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
onReleased = lib.hideRadial,
|
-- onReleased = lib.hideRadial,
|
||||||
})
|
})
|
||||||
|
|
||||||
AddEventHandler('onClientResourceStop', function(resource)
|
AddEventHandler('onClientResourceStop', function(resource)
|
||||||
|
|||||||
Reference in New Issue
Block a user