mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
feat(client/interface): close functions for input and alert dialogs
This commit is contained in:
@@ -21,6 +21,17 @@ function lib.alertDialog(data)
|
||||
return Citizen.Await(alert)
|
||||
end
|
||||
|
||||
function lib.closeAlertDialog()
|
||||
if not alert then return end
|
||||
alert:resolve(nil)
|
||||
alert = nil
|
||||
SetNuiFocus(false, false)
|
||||
SendNUIMessage({
|
||||
action = 'closeAlertDialog'
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
RegisterNUICallback('closeAlert', function(data, cb)
|
||||
cb(1)
|
||||
SetNuiFocus(false, false)
|
||||
|
||||
Reference in New Issue
Block a user