mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-16 22:46:03 +01:00
fix(client): Add missing NUI callbacks
This commit is contained in:
@@ -24,11 +24,13 @@ function lib.registerContext(context)
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNUICallback('openContext', function(id)
|
||||
RegisterNUICallback('openContext', function(id, cb)
|
||||
cb(1)
|
||||
lib.showContext(id)
|
||||
end)
|
||||
|
||||
RegisterNUICallback('clickContext', function(data)
|
||||
RegisterNUICallback('clickContext', function(data, cb)
|
||||
cb(1)
|
||||
if data.event then TriggerEvent(data.event, data.args) end
|
||||
if data.serverEvent then TriggerServerEvent(data.serverEvent, data.args) end
|
||||
SetNuiFocus(false, false)
|
||||
@@ -37,6 +39,7 @@ RegisterNUICallback('clickContext', function(data)
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNUICallback('closeContext', function()
|
||||
RegisterNUICallback('closeContext', function(_, cb)
|
||||
cb(1)
|
||||
SetNuiFocus(false, false)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user