
require( "scripts/style.lua" );
require( "scripts/ProfilesWindow.lua" );

kButtonSpacing = 45;
kButtonY = 293;
kButtonX = 0;

function QuitGame()
	CloseWindow();
end

MakeDialog
{
	-- Name the modal dialog
	name="mainmenu",
	
	MainMenu
	{
		name="tmainmenu",
		w=1024,
		h=768,
		fit=true;
		
		Bitmap 
		{
		name="backgroundimage",
		image="screens/title/titlescreen/lacey_title.png",
		alpha=true,
		
		w=1024,
		h=768,
		},
		
		Bitmap 
		{
		name="backgroundimage",
		image="screens/title/titlescreen/contour.png",
		alpha=true,
		
		x=92,
		y=257,
		},

			SetStyle( MenuButtonStyle ),
			
			Button
			{
				x=126,
				y=289,
				name="profiles",
				flags = kVAlignCenter + kHAlignCenter,
				MenuButtonLabel("profiles"),
				type = kPush,
				mask = "screens/title/titlescreen/bouton01_mask.png",
				graphics = {
					"screens/title/TITLESCREEN/bouton01_off_o.png",
					"screens/title/TITLESCREEN/bouton01_on_o.png",
					"screens/title/TITLESCREEN/bouton01_off_o.png"
				}
			},
			
			Button
			{
				x=110,
				y=346,
				name="options",
				MenuButtonLabel("options"),
				type = kPush,
				mask = "screens/title/titlescreen/bouton02_mask.png",
				graphics = {
					"screens/title/TITLESCREEN/bouton02_off_o.png",
					"screens/title/TITLESCREEN/bouton02_on_o.png",
					"screens/title/TITLESCREEN/bouton02_off_o.png"
				}
			},

			Button
			{
				x=109,
				y=402,
				name="highscores",
				MenuButtonLabel("highscores"),
				type = kPush,
				mask = "screens/title/titlescreen/bouton03_mask.png",
				graphics = {
					"screens/title/TITLESCREEN/bouton03_off_o.png",
					"screens/title/TITLESCREEN/bouton03_on_o.png",
					"screens/title/TITLESCREEN/bouton03_off_o.png"
				}
			},
			
			
			Button
			{
				x=110,
				y=458,
				name="credits",
				MenuButtonLabel("credits"),
				type = kPush,
				mask = "screens/title/titlescreen/bouton04_mask.png",
				graphics = {
					"screens/title/TITLESCREEN/bouton04_off_o.png",
					"screens/title/TITLESCREEN/bouton04_on_o.png",
					"screens/title/TITLESCREEN/bouton04_off_o.png"
				}
			},
			
			Button
			{
				x=126,
				y=515,
				name="quit",
				MenuButtonLabel("quit"),
				type = kPush,
				mask = "screens/title/titlescreen/bouton05_mask.png",
				graphics = {
					"screens/title/TITLESCREEN/bouton05_off_o.png",
					"screens/title/TITLESCREEN/bouton05_on_o.png",
					"screens/title/TITLESCREEN/bouton05_off_o.png"
				},
				command=
					function()
						result = DisplayDialog {
							"scripts/yesno.lua",
							body ="quitconfirm",
							title = "quittitle"
						};
						if (result=='yes') then
							PostMessage( CreateNamedMessage( kQuitNow, "Quit" ) );
						end
					end
			},
			
			Button
			{
				x=350,
				y=285,
				name="gamemode1",
				PlayButtonLabel("gamemode1"),
				type = kPush,
				mask = "screens/title/titlescreen/play_mask.png",
				graphics = {
					"screens/title/TITLESCREEN/play_off_o.png",
					"screens/title/TITLESCREEN/play_on_o.png",
					"screens/title/TITLESCREEN/play_off_o.png"
				}
			},
			
			Button
			{
				x=30,
				y=668,
				name="usertext",
				label="Hello",
				type = kPush,
				graphics = {
					"screens/title/TITLESCREEN/bulle.png",
					"screens/title/TITLESCREEN/bulle.png",
					"screens/title/TITLESCREEN/bulle.png"
				}
			},
	}
}