PromptChoiceDialog

From Moving Light Assistant
Revision as of 10:57, 17 November 2015 by Andyv wiki admin (Talk | contribs) (Added Page.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PromptChoiceDialog( questionText, defaultButtonText, alternateButtonText )

questionText is a string. This is the text that will appear in the main part of the dialog.
defaultButtonText is a string. This is the text that will appear in the default button. i.e. OK .
alternateButtonText is a string. This is the text that will appear in the alternate button. i.e. Cancel
Returns a boolean. True if the default button is clicked (or Enter key pressed), or False if the alternate button is clicked (or Escape key pressed).

This function is only available in MLA v1.2.1 Beta 4 onwards.

This function will pause the script and show a dialog with the message in the questionsText parameter. There are two standard dialog buttons which are labelled with the text in the defaultButtonText and alternateButtonText parameters. Once the message dialog is dismissed, it will return a true or false value. True if the default button is clicked, and False if the alternate button is clicked.

The dialog can be used for example to allow the user to make a decision if they wish to continue with the script.