mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(interface/context): ability to forcefully hide the context menu
This commit is contained in:
@@ -29,6 +29,12 @@ end
|
|||||||
|
|
||||||
function lib.getOpenContextMenu() return openContextMenu end
|
function lib.getOpenContextMenu() return openContextMenu end
|
||||||
|
|
||||||
|
function lib.hideContext()
|
||||||
|
SetNuiFocus(false, false)
|
||||||
|
SendNUIMessage({action = 'hideContext'})
|
||||||
|
openContextMenu = nil
|
||||||
|
end
|
||||||
|
|
||||||
RegisterNUICallback('openContext', function(id, cb)
|
RegisterNUICallback('openContext', function(id, cb)
|
||||||
cb(1)
|
cb(1)
|
||||||
lib.showContext(id)
|
lib.showContext(id)
|
||||||
|
|||||||
Reference in New Issue
Block a user