require "scripts/style.lua"

if gQuitVerifyActive then
	return;
end

gQuitVerifyActive = true;

result = 'no';
if IsInGame() then
	result = DisplayDialog
	{
		"scripts/generic_yesno.lua",
		body = "ui.dialog.quit.confirm.ingame",
		title = "menu/ico_quit"
	};
else
	result = DisplayDialog
	{
		"scripts/generic_yesno.lua",
		body = "ui.dialog.quit.confirm",
		title = "menu/ico_quit"
	};
end

if (result=='yes') then
	PostMessage( CreateNamedMessage( kQuitNow, "Quit" ) );
end

gQuitVerifyActive = false;

