require( "scripts/style.lua" );
require("scripts/styles/mainmenustyle.lua");

kButtonSpacing = 60;	-- Put our buttons 60 pixels apart
kButtonY = kCenter-60;	-- Three buttons means center 60 pixels above the center
-- pause all sfx and music sounds
PauseAllSounds();
MakeDialog
{
	-- Name the modal dialog
	name="pausemenu",
	Bitmap
	{
		image="common/screens/in_game_menu/ingame_box_coregame",
		x=kCenter,
		y=kCenter,
		
		SetStyle(InGameTitleStyle),
		
		Text
		{ 
			name = "title",  
			x = 140, y = 69.0,
			w = kMax, h = kMax,
			label = "menu_ingame_title",
		},
		
		SetStyle(InternalButtonStyle),
		BlgButton
		{
			x= 65,
			y= 110,
			width = 400, height = 200,
			positionMatrix = { x = 20, y = 15 },
            labelMatrix = {x = -2, y = 2},
			graphics = {
				"common/screens/in_game_menu/ingame_orange_button",
				"",
				"",
				"",
			},
			label="resume",
			close = true,	-- Just close this window
			command = function()
				ResumeAllSounds();
				CloseWindow();
				end
			
		},
        
        BlgButton
		{
			x= 79,
			y= 185,
			width = 400, height = 200,
			positionMatrix = { x = 20, y = 10 },
            labelMatrix = {x = -1, y = -1},
			graphics = {
				"common/screens/in_game_menu/ingame_green_button",
				"",
				"",
				"",
			},
			label="menu_ingame_levelSelect",
			close = true,
			command=
			function()
					ReturnToLevelSelector();
			end
		},

        BlgButton
		{
			x= 79,
			y= 245,
			width = 400, height = 200,
			positionMatrix = { x = 20, y = 10 },
            labelMatrix = {x = -1, y = -1},
			graphics = {
				"common/screens/in_game_menu/ingame_green_button",
				"",
				"",
				"",
			},
			label="instructions",
			command=
			function()
					DoModal("scripts/windows/wndinstructions.lua");
			end
		},
		
		BlgButton
		{
			x= 79,
			y= 305,
			width = 400, height = 200,
			positionMatrix = { x = 20, y = 10},
            labelMatrix = {x = -1, y = -1},
			graphics = {
				"common/screens/in_game_menu/ingame_green_button",
				"",
				"",
				"",
			},
			label="options",
			command=
				function()
					-- Pop up an options screen
					DoModal("scripts/windows/wndoptions.lua");
				end
		},
		
		BlgButton
		{
			x= 79,
			y= 360,
			width = 400, height = 200,
			positionMatrix = { x = 20, y = 10 },
            labelMatrix = {x = -1, y = -1},
			graphics = {
				"common/screens/in_game_menu/ingame_green_button",
				"",
				"",
				"",
			},
			label="quit",
			command=
				function()
			        	local t = {"scripts/windows/wnddialog.lua", body = "quitconfirm", title = "quittitle", result = false}
          				DisplayDialog(t);
						
						if t.result then
							PostMessage(CreateNamedMessage(kQuitNow, "Quit"));
							SaveWindowMode()
						end
				end
		},
	},
}