kellyelton/OCTGN — Issue #22: multiple choice boxes instead of just yes/no (confirm function)
Author: brine
Created: 2012-01-31 16:11:54+00:00
State: open

the “confirm” function opens up a popup window asking the user a question, and provides a yes box and a no box. It would be useful to have a similar function to allow for multiple choice inputs (other than just yes and no), with script-defined click-box titles.

There's two python functions that can call a pop-up window for user inputs: confirm() and askInteger(). Confirm uses yes and no buttons, while askInteger has a text box where they can input an integer number.

I'd like to see a third function which allows the game definition to create custom-defined text buttons instead of yes/no and have if paths for each option.

something like this, maybe:

def shufflePile(group, x = 0, y = 0):
mute()
choice = askMulti("Which group do you want to shuffle?", "Graveyard", "Library", "Exiled Zone")
if choice = 1:
....
elif choice = 2:
....
elif choice = 3:
....