Methods | |
| Number | critical (String text, String title, String button0, String button1="", String button2="") |
| Number | information (String text, String title, String button0, String button1="", String button2="") |
| Number | question (String text, String title, String button0, String button1, String button2="") |
| Number | warning (String text, String title, String button0, String button1, String button2="") |
The DzMessageBox class is available in DAZ Script via the global variable MessageBox. It provides functions that display pre-built message boxes to the user. This is the easiest way for a script to interact with a user - simply call one of the functions as shown in the following examples:
MessageBox.information( "MyScript finished successfully.", "MyScript", "&OK" );
if( MessageBox.question( "Do you want to reset the entire figure?", "MyScript", "&Yes", "&No" ) == 0 ){ resetEntireFigure(); }
if( MessageBox.warning( "If you continue, the entire figure will be reset!", "MyScript", "&OK", "&Cancel" ) == 1 ) return;
var error = doSomething();
if( error != 0 ){
MessageBox.critical( "The script has encountered a critical error!", "MyScript", "&OK" );
return;
}
| Number DzMessageBox::critical | ( | String | text, | |
| String | title, | |||
| String | button0, | |||
| String | button1 = "", |
|||
| String | button2 = "" | |||
| ) |
Shows a critical dialog box to the user.
| text | The text that is shown in the body of the dialog. | |
| title | The title of the dialog. | |
| button0 | The text of button 0 | |
| button1 | The text of button 1 (if empty, no button will be shown) | |
| button2 | The text of button 2 (if empty, no button will be shown) |
| Number DzMessageBox::information | ( | String | text, | |
| String | title, | |||
| String | button0, | |||
| String | button1 = "", |
|||
| String | button2 = "" | |||
| ) |
Shows an information dialog box to the user.
| text | The text that is shown in the body of the dialog. | |
| title | The title of the dialog. | |
| button0 | The text of button 0 | |
| button1 | The text of button 1 (if empty, no button will be shown) | |
| button2 | The text of button 2 (if empty, no button will be shown) |
| Number DzMessageBox::question | ( | String | text, | |
| String | title, | |||
| String | button0, | |||
| String | button1, | |||
| String | button2 = "" | |||
| ) |
Shows a question dialog box to the user.
| text | The text that is shown in the body of the dialog. | |
| title | The title of the dialog. | |
| button0 | The text of button 0 | |
| button1 | The text of button 1 | |
| button2 | The text of button 2 (if empty, no button will be shown) |
| Number DzMessageBox::warning | ( | String | text, | |
| String | title, | |||
| String | button0, | |||
| String | button1, | |||
| String | button2 = "" | |||
| ) |
Shows a warning dialog box to the user.
| text | The text that is shown in the body of the dialog. | |
| title | The title of the dialog. | |
| button0 | The text of button 0 | |
| button1 | The text of button 1 | |
| button2 | The text of button 2 (if empty, no button will be shown) |