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