Main Index : Reference :
Opens a simple text dialog, with a selectable icon and some standard buttons.
[int] TextDialog([string] text, [int] flags);
The text parameter controls what text is shown. The following flags control what combination of buttons are shown:
| Flag | Explanation |
DLG_OK |
OK |
DLG_OKCANCEL |
OK and Cancel |
DLG_ABORTRETRYIGNORE |
Abort, Retry and Ignore |
DLG_YESNOCANCEL |
Yes, No and Cancel |
DLG_YESNO |
Yes and No |
DLG_RETRYCANCEL |
Retry and Cancel |
They can be combined with the following constants to display an icon:
| Flag | Explanation |
DLG_ICONSTOP |
A stop sign icon |
DLG_ICONQUESTION |
A question mark icon |
DLG_ICONEXCLAMATION |
An exclamation mark icon |
DLG_ICONASTERISK |
An asterisk icon |
The possible return values are, depending on the selected type:
| Flag | Explanation |
DLG_R_OK |
OK clicked |
DLG_R_CANCEL |
Cancel clicked |
DLG_R_ABORT |
Abort clicked |
DLG_R_RETRY |
Retry clicked |
DLG_R_IGNORE |
Ignore clicked |
DLG_R_YES |
Yes clicked |
DLG_R_NO |
No clicked |
// Opens the above dialog with an exclamation mark icon
var result = TextDialog("Hello World!", DLG_OKCANCEL + DLG_ICONEXCLAMATION);
// Checks the result
if (result == DLG_R_OK)
{
TextDialog("You pressed OK!", DLG_OK);
}