mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-17 09:48:33 +00:00
feat(interface/radial): allow clearing all global radial menu items (#272)
* Add clearAllRadialItems * Refresh rather then close, rename
This commit is contained in:
1 parent
a98b6ac267
commit
b32ab6e948
1 file changed
+10
@@ -182,6 +182,16 @@ function lib.removeRadialItem(id)
|
||||
refreshRadial(id)
|
||||
end
|
||||
|
||||
---Removes all items from the global radial menu.
|
||||
function lib.clearRadialItems()
|
||||
table.wipe(menuItems)
|
||||
|
||||
if isOpen then
|
||||
refreshRadial()
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
RegisterNUICallback('radialClick', function(index, cb)
|
||||
cb(1)
|
||||
|
||||
|
||||
Reference in new issue
Block a user