//Copyright (C) Ben Parbury - All Rights Reserved. Unauthorized copying of this file, via any medium is strictly prohibited. Written by Ben Parbury <ben@gridlockinteractive.com> 2014
function LevelScript()
{
	this.CreateMenu = function()
	{
		
		this.aboutMenuItems = 
		{
			Facebook: "http://www.facebook.com/GridlockInteractive",
			Game: "http://www.polyologygame.com",
			Treganza: "http://www.rosstregenza.com/",

			Twitter:  "http://www.twitter.com/GridlockBen",
			Developer: "http://www.gridlockinteractive.com",
			Norgate: "http://www.graemenorgate.com"
		};
		
		var about = new Menu("About", EMenuLayout.Grid, new MenuGrid(5, 9));

		var count = 0;
		var x=0;
		var y=0;
		
		about.AddMenuItem(new Text("Social"), EMenuItemStyle.Medium, new Vec2(1,2));
		about.AddMenuItem(new Text("Web"), EMenuItemStyle.Medium, new Vec2(2,2));
		about.AddMenuItem(new Text("Audio"), EMenuItemStyle.Medium, new Vec2(3,2));
		
		for (var aboutButton in this.aboutMenuItems)
		{
			y=Math.floor(count/3);
			x = count - y*3;
			var name = aboutButton;
			about.AddMenuItem(new Button(name, function(button) { window.open(gLevelScript.aboutMenuItems[button.name]); }), EMenuItemStyle.SmallThin, new Vec2(x + 1,y + 3));
			count++;
		}
		
		about.AddMenuItem(new Button("Help", function() { window.open("http://www.polyologygame.com/help/");  }), EMenuItemStyle.Small, new Vec2(2,(y+5)));
		about.AddMenuItem(new Button("Back", function() { gLevelSystem.LoadLevel("Menu", "Extras"); }), EMenuItemStyle.Small, new Vec2(2,(y+6)));
		
		return about;
	}

	this.Load = function()
	{
		this.menu = this.CreateMenu();
		gMenuSystem.Register(this.menu);
	}
	
	this.Unload = function()
	{
		gMenuSystem.Unregister(this.menu);
	}
	
	this.Update = function()
	{
	}
	
	this.DrawClear = function()
	{
	}
	
	this.Draw = function()
	{
	}
	
	this.Debug = function()
	{
	}
}

