refactor(client/interface): nui focus consistency

This commit is contained in:
Linden committed 2023-03-23 05:55:16 +11:00
1 parent 9413f9dae8
commit c4b87a0d91
4 files changed
+19 -15

No files matched your search

+4 -2
View File
@@ -10,7 +10,7 @@ function lib.skillCheck(difficulty, inputs)
if skillcheck then return end
skillcheck = promise:new()
SetNuiFocus(true, false)
lib.setNuiFocus(false, true)
SendNUIMessage({
action = 'startSkillCheck',
data = {
@@ -24,9 +24,11 @@ end
RegisterNUICallback('skillCheckOver', function(success, cb)
cb(1)
if skillcheck then
lib.resetNuiFocus()
skillcheck:resolve(success)
skillcheck = nil
SetNuiFocus(false, false)
end
end)