show_message_ext(str,but1,but2,but3)

From ENIGMA
Jump to navigation Jump to search

Description

Shows a message with up to three buttons that can be entered by the user.

Parameters

Parameter Data Type Description
str string the message to display
but1 string the text for the first button, leave blank to hide the button
but2 string the text for the second button, leave blank to hide the button
but3 string the text for the third button, leave blank to hide the button

Return Values

integer: Returns the number of the button entered by the user or 0 if they cancel the dialog.

Example Call

// demonstrates showing a multiple-choice dialog
switch(show_message_ext("Please select your favorite animal:", "Cat", "Dog", "Mouse")) {
  case 0:
    // user cancelled the dialog
    break;
  case 1:
    // user selected "Cat"
    break;
  case 2:
    // user selected "Dog"
    break;
  case 3:
    // user selected "Mouse"
    break;
}