How can I set up a dialog to prompt the user to select a palette from the built-in palettes (and then change the current palette as needed) or allow them to choose to use whatever the current palette is?
the easiest way is to summon app.alert() window
app.alert{
title = "ALERT",
text = {
"Select a palette.",
"Do it now!"
}
}
however that will prevent user to do anything unless they click on a button. if you don’t want that, you’ll have to create your own alert window through dialog()
local dlgAlert = Dialog{ title = "ALERT" }
dlgAlert
:label { text="Select a palette." }
:newrow()
:label { text="Do it now!" }
:button {
text="Close",
onclick = function()
dlgAlert:close()
end
}
dlgAlert:show{ wait=false }
1 Like