-
- Downloads
This adds a new dialog similar to the yes/no dialogs that presents a list of...
This adds a new dialog similar to the yes/no dialogs that presents a list of choices (up to 50) that are selected by individual buttons within the dialog frame. Sample call sequence: Dialog = require"engine.ui.Dialog" self = game local choices = {("Stay: here"):format(), "I have to press a button for this?", "Keep Going", "Ignore this Issue", "Complain about this revoltin' development", "Curse at the game", "Try to sneak out", "This is ridiculous and should be fixed, forever", "hurry up. I'm waiting", "No, thank you. I don't care for any Grey Poupon.", "My cat has bigger fleas than your orc.", "I wish to purchase some #CHOCOLATE#USED FOOD#LAST#.", "Continue as if nothing happened", "Ignore the Problem", "Report This Problem", "Play Truth or Dare", "Write your will", "Do NOT pass Go. Do NOT collect 200 zorkmids."} local choice_handler = function(choice) if choice == 2 then print("Keep Trying selected") elseif choice == 3 then print("Ignore selected") elseif choice == 4 then print("Report the problem") else print("Stay selected") end end local text = "You have reached a cross-roads in your quest to become #LIGHT_RED#THE MOST POWERFUL BEING IN THE UNIVERSE#LAST#. Your choice here will raise up world leaders and bring great nations down. \nYou may become an immortal beacon of power for all time to come. \nOr you might become someone's pet Wretchling. \nTake what action?" dm=Dialog:multiButtonPopup("Momentous Decision!", text, choice_handler, choices, false, 1 -- for escape )
parent
7006cf93
No related branches found
No related tags found
Please register or sign in to comment