choiceDialog

fnint choiceDialog(string message, string b0, string b1 = null, string b2 = null)

Shows a choice dialog with up to 3 buttons.

The buttons are displayed right-to-left, so b0 is the rightmost button.

Parameters

messageThe message to display
b0First button label (rightmost)
b1Second button label (or null)
b2Third button label (or null)

Returns

Index of the button clicked (0, 1, or 2)

Example:

int result = choiceDialog("Save changes?", "Don't Save", "Cancel", "Save");
if (result == 2) saveDocument();
else if (result == 1) return; // cancelled