Files
aiolauncher_scripts/samples/checkbox-dialog-sample.lua
2021-08-06 14:43:34 +03:00

17 lines
352 B
Lua

function on_resume()
ui:show_text("Open dialog")
end
function on_click()
dialog_items = { "One", "Two", "Three" }
ui:show_checkbox_dialog("Title", dialog_items, 2)
end
function on_dialog_action(idx)
if idx == -1 then
ui:show_toast("Dialog cancelled")
else
ui:show_toast("Checked: "..dialog_items[idx])
end
end