Files
community_bridge/modules/input/ox_lib/client.lua
T
MrNewb 444040dd39 This was crowleys commit and work - Refactor entity behaviors and improve particle handling
Refactored entity behavior triggers to simplify argument passing and added OnSet handler for particle behaviors. Improved particle effect management and event handling, updated locale and lib initialization in several modules, and fixed skill metadata access. Also streamlined point zone logic and menu/zone system initialization for better reliability.
2025-10-26 16:20:27 -04:00

32 lines
941 B
Lua

---@diagnostic disable: duplicate-set-field
local resourceName = "ox_lib"
local configValue = BridgeClientConfig.InputSystem
if (configValue == "auto" and GetResourceState(resourceName) == "missing") or (configValue ~= "auto" and configValue ~= resourceName) then return end
Input = {}
if not lib then Require('init.lua', 'ox_lib') end
function Input.Open(title, data, isQBFormat, submitText)
local inputs = data.inputs
if isQBFormat then
local convertedData = {}
local returnData = lib.inputDialog(title, QBToOxInput(inputs))
for i, v in pairs(inputs) do
for k, j in pairs(returnData or {}) do
if k == v.name then
convertedData[v.name] = j
end
end
end
return convertedData
else
return lib.inputDialog(title, data)
end
end
function Input.GetResourceName()
return resourceName
end
return Input