feat(interface/radial): allow clearing all global radial menu items (#272)

* Add clearAllRadialItems

* Refresh rather then close, rename
This commit is contained in:
Malcolm Keefe
2023-03-16 04:26:17 -04:00
committed by GitHub
parent a98b6ac267
commit b32ab6e948

View File

@@ -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)