Donut Team is a labor of love, built and maintained by a small group of passionate developers. We invest our own time and resources to offer our tools, mods, and web services completely free of charge.

We don't run ads, and we will never sell your data - period.

If you've enjoyed anything we've created, please consider supporting our work with a one-time or monthly donation via our Ko-fi page . Every contribution helps us continue building great experiences for the community.

Dismiss
  • Modding Tools
  • Lucas' Simpsons Hit & Run Mod Launcher
  • Hacks
  • Mod Requirable Hacks
  • Custom Files
  • Lua Functions
  • Dialog Functions

Dialog

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