require( "scripts/style.lua" );

MakeDialog
{
	-- Name the modal dialog
	name="MainMenu",
	MainMenu
	{
		x=0,y=0,w=kMax,h=kMax,
		pane1= "backgrounds/title/back,0,0",
		pane2= "backgrounds/title/mary_celeste,14,14",
		pane3= "backgrounds/title/layer_2,0,689",
		panewheel= "backgrounds/title/wheel,423,602",
		eff1= "backgrounds/title/effect1,0,0",
		eff2= "backgrounds/title/effect2,0,0",
		eff3= "backgrounds/title/effect3,0,0",
		ship = "backgrounds/title/ship,250,660,1,1.0f,3,5",

		--logo= "backgrounds/iWin_logo,25,100,http://www.iwin.com",
		--anim1 = "backgrounds/title/parus;80;174;291",
		--anim2 = "anim/titl_piktoanim.xml,464,237",
		cloud1="0,0,1024,768;aa;backgrounds/title/tuman;-2;0;130",
		cloud2="0,0,1024,768;aa;backgrounds/title/tuman1;-1;0",
		timeeffmin = 5,
		timeeffmax = 10,
		timeeffframe = 60,
		
		
		name="mainmenuwww",
		usernamedef="fonts/lithos.mvec; 22; 770, 610, 200,30; 223,178,0,255",
		fit=true;
		
		music= "audio/music/Tit_Night_Creep_Final.ogg",
		ambient = "",
		
		buttprofile ="profile;118,717,0,0;backgrounds/title/b_profile;backgrounds/title/b_profile_pressed;backgrounds/title/b_profile_mouseover",
		buttopt ="opt;263,717,0,0;backgrounds/title/b_options;backgrounds/title/b_options_pressed;backgrounds/title/b_options_mouseover",
		buttplay ="play;466,656,0,0;backgrounds/title/b_play;backgrounds/title/b_play_pressed;backgrounds/title/b_play_mouseover",
		buttcred ="cred;631,720,0,0;backgrounds/title/b_credits;backgrounds/title/b_credits_pressed;backgrounds/title/b_credits_mouseover",
		--buttexit ="exit;777,718,0,0;backgrounds/title/b_exit;backgrounds/title/b_exit_pressed;backgrounds/title/b_exit_mouseover",
	
			Button
			{
				x=777, y=718,
				name="quit",
				parent = DefaultStyle, 
				type= kPush,
				graphics = {"backgrounds/title/b_exit",	"backgrounds/title/b_exit_pressed",	"backgrounds/title/b_exit_mouseover"},
				 command=
				 	function()
						PlayGSound("butt");
				 		 result = DisplayDialog {
				 			 "scripts/yesno.lua",
				 			 body ="quitconfirm",
				 			 title = "quittitle"
				 		 };
				 		 if (result=='yes') then
				 			PostMessage( CreateNamedMessage( kQuitNow, "Quit" ) );
				 		 end
				 	end
			},
	
		Text
		 {
			  font = { "fonts/lithos.mvec", 18, Color(223,178,0,255)},
			  name = "welcome",
			  x=770,y=580,w=200,h=50,
			  flags = kHAlignRight + kVAlignCenter,
			  label = "welcome"
		 },

		 SetStyle( MenuButtonStyle ),

		 MenuButton
		 {
			 x=705,	 y=625,
			 w=270,	 h=40,
			 name="welcomea",
			 MenuButtonLabel("welcomeadd"),
			 type = kPush,
			 command=
				 function()
					 StartProfBox();
				 end
		 },

	}
}
