mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 15:06:02 +01:00
13 lines
319 B
Lua
13 lines
319 B
Lua
|
|
local keepInput = IsNuiFocusKeepingInput()
|
||
|
|
|
||
|
|
function lib.setNuiFocus(allowInput, disableCursor)
|
||
|
|
keepInput = IsNuiFocusKeepingInput()
|
||
|
|
SetNuiFocus(true, not disableCursor)
|
||
|
|
SetNuiFocusKeepInput(allowInput)
|
||
|
|
end
|
||
|
|
|
||
|
|
function lib.resetNuiFocus()
|
||
|
|
SetNuiFocus(false, false)
|
||
|
|
SetNuiFocusKeepInput(keepInput)
|
||
|
|
end
|