mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-11 00:33:56 +00:00
refactor(client/interface): nui focus consistency
This commit is contained in:
1 parent
9413f9dae8
commit
c4b87a0d91
4 files changed
+19
-15
No files matched your search
@@ -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