Available since Version 1.27.
Shows a Windows dialog box with a customisable icon and buttons.
Syntax
Dialog( icon, buttons, message, [title] )Arguments
- icon (integer): The icon to use.
- For convenience, constants for all valid icons are provided in the DialogIcon table.
- buttons (integer): The buttons to show.
- For convenience, constants for all valid buttons are provided in the DialogButtons table.
- message (string): The message to show.
- title (string): The dialog title.
Return Values
- (integer): The result.
- For convenience, constants for all valid results are provided in the DialogResult table.
Examples
local Result = Dialog(
DialogIcon.Error,
DialogButtons.OKClose,
"Press OK to continue or Close to close the game."
)
if Result == DialogResult.Close then
os.exit()
end