require( "scripts/style.lua" );

kButtonSpacing = 3 + 64;
kButtonY = 501;
kButtonX = 745;

ProfileNameTextFont = {
  oldsansblackFont,
  33,
  RedTextColor
};


-- Our game set up
MakeDialog
{
	-- Name the modal dialog
	name="MainMenuTop",
	MainMenu
	{
align=kHAlignLeft + kVAlignTop,
		--image = "backgrounds/mainmenu",
		name="MainMenu",
		x = 0,
		y = 0,
		w = 1024,
		h = 768,
		SetStyle( MenuButtonStyle ),
		Button
		{
			name = "menuplaygame",
			x=kButtonX,
			y=kButtonY + kButtonSpacing*0,
			graphics = BigButtonGraphics,
			--graphics = MediumButton2Graphics,
			--MenuButtonLabel(40, 10, 38, 10, "playgame", oldsansblackFont, 36, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
			MenuButtonLabel(0, 0, 255, 56, "playgame", oldsansblackFont, 36, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
			command=
				function()
					if(CheckValidProfile()) then
						--[[
						if(ShouldGoToBriefing()) then
							SwapToModal("scripts/briefing.lua");
						else
							SwapToModal("scripts/familyintroduction.lua");
						end
						--]]
						SwapToModal("scripts/map.lua");
					else
						DisplayDialog{"scripts/newname.lua"};
					end
				end
		},
		Button
		{
			name = "menuoptions",
			x=kButtonX,
			y=kButtonY + kButtonSpacing*1,
			graphics = BigButtonGraphics,
			--graphics = MediumButton2Graphics,
			--MenuButtonLabel(40, 10, 38, 10, "options", oldsansblackFont, 36, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
			MenuButtonLabel(0, 0, 255, 56, "options", oldsansblackFont, 36, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
			command=
				function()
					DisplayDialog{"scripts/customoptions.lua"};
				end
		},
		Button
		{
			name = "menuhelp",
			x=kButtonX,
			y=kButtonY + kButtonSpacing*2,
			graphics = BigButtonGraphics,
			--graphics = MediumButton2Graphics,
			MenuButtonLabel(0, 0, 255, 56, "help", oldsansblackFont, 36, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
			command=
				function()
					SwapToModal("scripts/help.lua");
				end
		},
		Button
		{
			name = "menucredits",
			x=745,
			y=708,
			graphics = SmallMainMenuButtonGraphics,
			--graphics = MediumButton2Graphics,
			MenuButtonLabel(0, 0, 121, 39, "credits", oldsansblackFont, 36, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
			command=
				function()
					SwapToModal("scripts/credits.lua");
				end
		},
		Button
		{
			name = "menuquit",
			x=883,
			y=708,
			graphics = SmallMainMenuButtonGraphics,
			--graphics = MediumButton2Graphics,
			MenuButtonLabel(0, 0, 121, 39, "quit", oldsansblackFont, 36, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
			command=
				function()
					DisplayDialog{"scripts/quit.lua"};
				end
		},
		--[[
		Button
		{
			name = "menuminigame",
			x=0,
			y=0,
			graphics = BigButtonGraphics,
			--graphics = MediumButton1Graphics,
			MenuButtonLabel(0, 0, 255, 56, "minigame", oldsansblackFont, 36, Color(135,32,33,255), Color(44,76,60,255), Color(83,119,101,255));
			command=
				function()
					DisplayDialog{"scripts/minigame.lua"};
				end
		},
		--]]
		Button
		{
			name = "menuprofile",
			x=84,
			y=645,
			graphics = {
				"buttons/playername_up",
				"buttons/playername_down",
				"buttons/playername_over"
			},
			MenuButtonLabel(64, 88, 318, 18, "notyou", oldsansblackFont, 18, Color(85,47,47,255), Color(44,76,60,255), Color(83,119,101,255));
			command=
				function()
					DisplayDialog{"scripts/profilemanager.lua"};
				end,
			Text
			{
				name = "profilename",
				font = ProfileNameTextFont,
				x=80,
				y=13,
				w = 288,
				h = 67,
				flags = kHAlignCenter + kVAlignCenter,
			},
		},
		--[[
		SetStyle(DialogBodyText),
		Text
		{
			name = "nannytitle",
			label = "nannytitle",
			x = 73,
			y = 105,
			w = 407,
			h = 121,
			font = {
				trebuchetmsFont,
				60,
				RedTextColor
			};
			flags = kHAlignCenter+kVAlignCenter,
		},
		--]]
		SetStyle(DialogBodyText),
		Text
		{
			name = "legalstatement",
			label = "legalstatement",
			x = 7,
			y = 5,
			w = 555,
			h = 23,
			font = {
			  oldsansblackFont,
			  20,
			  Color(255,255,255)
			};
			flags = kHAlignLeft+kVAlignCenter,
		}
	}
}
SetFocus("MainMenu");
