mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
refactor(client/interface): nui focus consistency
This commit is contained in:
@@ -38,7 +38,7 @@ function lib.inputDialog(heading, rows, options)
|
||||
end
|
||||
end
|
||||
|
||||
SetNuiFocus(true, true)
|
||||
lib.setNuiFocus(false)
|
||||
SendNUIMessage({
|
||||
action = 'openDialog',
|
||||
data = {
|
||||
@@ -53,18 +53,22 @@ end
|
||||
|
||||
function lib.closeInputDialog()
|
||||
if not input then return end
|
||||
input:resolve(nil)
|
||||
input = nil
|
||||
SetNuiFocus(false, false)
|
||||
|
||||
lib.resetNuiFocus()
|
||||
SendNUIMessage({
|
||||
action = 'closeInputDialog'
|
||||
})
|
||||
|
||||
input:resolve(nil)
|
||||
input = nil
|
||||
end
|
||||
|
||||
RegisterNUICallback('inputData', function(data, cb)
|
||||
cb(1)
|
||||
SetNuiFocus(false, false)
|
||||
lib.resetNuiFocus()
|
||||
|
||||
local promise = input
|
||||
input = nil
|
||||
|
||||
promise:resolve(data)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user