fix(client): Add missing NUI callbacks

This commit is contained in:
Luke committed 2022-04-11 16:14:32 +02:00
1 parent ed75b683d5
commit 128fb86954
1 file changed
+6 -3
+6 -3
View File
@@ -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)