require "scripts/style"

if gQuitVerifyActive then
	return;
end

gQuitVerifyActive = true;
if(gGameRunning == true) then
    SendGameMessage( "pause" );
end
DisplayDialog{
	"scripts/yesno.lua",
	yes=function()
		if(gGameRunning == true) then
			SendGameMessage( "quit" );
		end
		PostMessage( CreateNamedMessage( kQuitNow, "quit" ) );
	   end,
	no=function()
        if(gGameRunning == true) then
            SendGameMessage( "pause_ended" );
        end
	   end,       
	title = "quittitle",
	body = "quitconfirm",
};
gQuitVerifyActive = false;


