feat(web/dialog): Add checkbox type

This commit is contained in:
Luke
2022-05-02 13:51:01 +02:00
parent a3f38723e3
commit 0259de8dfe
4 changed files with 327 additions and 295 deletions

View File

@@ -4,12 +4,20 @@ function lib.inputDialog(heading, rows)
if input then return end
input = promise.new()
-- Backwards compat with string tables
for i = 1, #rows do
if type(rows[i]) == 'string' then
rows[i] = {type = 'input', label = rows[i]}
end
end
SetNuiFocus(true, true)
SendNUIMessage({
action = 'openDialog',
data = {
heading = heading,
inputs = rows
rows = rows
}
})