//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.CreateLicensesMenu = function()
	{
		this.licenses = new Menu("Licenses", EMenuLayout.Grid, new MenuGrid(5, 26));

		this.licenses.AddMenuItem(new Text("Licenses"), EMenuItemStyle.Medium, new Vec2(2, 1));
		this.licenses.AddMenuItem(new Text("\"If I have seen further it is by standing on the shoulders of giants.\""), EMenuItemStyle.Small, new Vec2(2, 3));
		this.licenses.AddMenuItem(new Text("Isaac Newton", 'right'), EMenuItemStyle.Tiny, new Vec2(4, 4));
		
		var specialThanks = [
			"Chromium Embedded Framework", "Copyright (c) 2008-2013 Marshall A. Greenblatt. Portions Copyright (c)", "2006-2009 Google Inc. All rights reserved.", "",
			"Buzz, a Javascript HTML5 Audio library", "Copyright (C) 2010-2014 Jay Salvat", "",
			"seedrandom.js", "Copyright 2014 David Bau.", "",
			"webfont.js", "Copyright 2013 Small Batch, Inc.", "",
			"The \"inih\" library ", "Copyright (c) 2009, Brush Technology", "All rights reserved.", "",
		];
		var rows = specialThanks.length;
		for(var y = 0; y < rows; y++)
		{
			this.licenses.AddMenuItem(new Text(specialThanks[y], 'left'), EMenuItemStyle.Tiny, new Vec2(0, y + 6));
		}
		
		this.licenses.AddMenuItem(new Button("Back", function() { gLevelSystem.LoadLevel("Menu", "Credits"); }), EMenuItemStyle.Small, new Vec2(2, rows + 7));

		gMenuSystem.Register(this.licenses);
	}

	this.Load = function()
	{
		this.CreateLicensesMenu();
	}
	
	this.Unload = function()
	{
		gMenuSystem.Unregister(this.licenses);
	}
	
	this.Update = function()
	{
	}
	
	this.DrawClear = function()
	{
	}
	
	this.Draw = function()
	{
	}
	
	this.Debug = function()
	{
	}
}

