require( "scripts/style.lua" );
HeaderFont = {
  standardFont,
  30,
  RedColor
};
kButtonSpacing = 125;	-- Put our buttons 60 pixels apart
kButtonY = kCenter;	-- Three buttons means center 60 pixels above the center
kOffset = -50;

-- When this dialog is popped up, we're entering pause state, so
-- let's just notify TGameState now.
SetState( kPause, true );
PauseTimer();

MakeDialog
{
	-- Name the modal dialog
	name="pausemenu",
	Bitmap
	{
		image="backgrounds/confirm",
		x=kCenter,
		y=kCenter,
		SetStyle(ButtonStyle),
		Button
		{
			x=kCenter+52+54 - kButtonSpacing + kOffset,
			y=kButtonY,
			name="resumebutton",
			label="resume",
			close = true,	-- Just close this window
			cancel=true,
			command=
				function()
	                SetState( kPause, false );
				end;
		},
		Button
		{
			x=kCenter+1-1-12+82+1+50 + kOffset,
			y=kCenter,
			name="optionsbutton",
			label="optionsbutton",
			command=
				function()
					-- Pop up an options screen
					DoModal("scripts/options.lua");
				end
		},
		Button
		{
			x=kCenter-122+1-12+58 + kButtonSpacing + kOffset,
			y=kButtonY+43,
			label="quit",
			command=
				function()
					--PopModal('pausemenu');
					--DoModal('scripts/mainmenu.lua');
					-- Our game processes this message--it's not
					-- handled by Playground
	                SetState( kPause, false );
	                QuitToMainMenu();
				end
		},
		SetStyle(DefaultStyle),
		Text
		{
			name = "PauseBoxTitle",
			label = "pause",
			x = 28,
			y = 31,
			w = 354,
			h = 38,
			font = HeaderFont,
			flags = kHAlignCenter+kVAlignCenter,
		}
	},
}
