[Script] Prompt user to select a palette (or use current)

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

	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" } 

	:label { text="Select a palette." }
	:label { text="Do it now!" } 
	:button { 
		onclick = function()
dlgAlert:show{ wait=false }
1 Like