Skip to content

Commit

Permalink
feat(web/dialog): Add checkbox type
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeWasTakenn committed May 2, 2022
1 parent a3f3872 commit 0259de8
Show file tree
Hide file tree
Showing 4 changed files with 327 additions and 295 deletions.
10 changes: 9 additions & 1 deletion resource/interface/client/input.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
})

Expand Down
Loading

0 comments on commit 0259de8

Please sign in to comment.