mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
Some people accidentally, mistakenly, and without any malicious intent forget to attribute code from this resource to its source. This change will hopefully assist people, so that they do not make that mistake again.
23 lines
622 B
Lua
23 lines
622 B
Lua
--[[
|
|
https://github.com/overextended/ox_lib
|
|
|
|
This file is licensed under LGPL-3.0 or higher <https://www.gnu.org/licenses/lgpl-3.0.en.html>
|
|
|
|
Copyright (c) 2025 Linden <https://github.com/thelindat/fivem>
|
|
]]
|
|
|
|
---@alias IconProp 'fas' | 'far' | 'fal' | 'fat' | 'fad' | 'fab' | 'fak' | 'fass'
|
|
|
|
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
|