Skip to content

Instantly share code, notes, and snippets.

@warmist
Last active December 10, 2015 00:59
Show Gist options
  • Save warmist/4355458 to your computer and use it in GitHub Desktop.
Save warmist/4355458 to your computer and use it in GitHub Desktop.
A list of functions easily called
--show a list of 'spells'
local dlg=require("gui.dialogs")
function doNothing()
print("Doing nothing real good")
end
function greetAndStuff()
dlg.showMessage("Greetings", "Season's greatings and lols")
end
listofspells={
{text="nothing", spell=doNothing,icon='*'},
{text="hello world", spell=greetAndStuff,key="CUSTOM_C"},
}
dlg.showListPrompt("Spelz","Choze spel",nil, listofspells,function(index,choice) choice.spell() end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment