// ================
// BATTLEZONE SHELL
//
// By Pandemic studios and William "Commando" Powell.  Originally created by Pandemic Studios and later modified by William Powell to take advantage of several features introduced in the 1.3 patch.
// Changes
//  Reorganized the options
//  Addedd a toggle for the TLI
// ================

//
// Mission-specific interface. Top-level entry must be named
// "ExtraOptions"
//
CreateControl("ExtraOptions", "WINDOW")
{
	ColorGroup("MAGENTA");
	Geometry("RIGHT", "TOP");
	Position(-40, 120);
	Size(540, 800);
	BorderSize(20);
	BevelSize(10);
	TabSize(220, 20);
	Title("DM Options");
	TitleFont("SMALL");
	Style("RIGHTTAB", "OUTLINE");
	
	OnEvent("Control::Activate")
	{		
		cmd("shell.background BZNESback1.pic");
	}		

		// Required control: gotta be able to get out of here.
		CreateControl("CloseExtras", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "BOTTOM");
			Position(0, 0);
			Size(280, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Server options");
			NotifyParent("Button::Press", "CloseExtra");
		}

		CreateControl("TimeLimit", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 0);
			Size(390, 18);
			Font("SMALL");
			Text("Time Limit (minutes):");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("TimeEdit", "EDIT")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(400, 0);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			JustifyText("RIGHT");
			Font("TINY");
			Style("ROLLOVER", "OUTLINE");
			Cursor("Highlight");
			UseVar("network.session.ivar1");
			SetIntegerRange("network.session.ivar1", 0, 99999);
		}

		CreateControl("KillLimit", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 40);
			Size(390, 18);
			Font("SMALL");
			Text("Kill Limit:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("KillEdit", "EDIT")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(400, 40);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			JustifyText("RIGHT");
			Font("TINY");
			Style("ROLLOVER", "OUTLINE");
			Cursor("Highlight");
			UseVar("network.session.ivar0");
			SetIntegerRange("network.session.ivar0", 0, 99999);
		}

		CreateControl("RandomizeType", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 80);
			Size(270, 18);
			Font("SMALL");
			Text("Respawn Vehicle:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("RandomizeFixed", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(280, 80);
			Size(58, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Fixed");
			UseVar("network.session.randomizetype");
			Value(0);
		}

		CreateControl("RandomizeRace", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(360, 80);
			Size(58, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Race");
			UseVar("network.session.randomizetype");
			Value(1);
		}

		CreateControl("RandomizeAny", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(440, 80);
			Size(58, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Any");
			UseVar("network.session.randomizetype");
			Value(2);
		}

		CreateControl("SpawnkillLimit", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 120);
			Size(450, 18);
			Font("SMALL");
			Text("Spawnkill if under (seconds):");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("SpawnkillEdit", "EDIT")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(460, 120);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			JustifyText("RIGHT");
			Font("TINY");
			Style("ROLLOVER", "OUTLINE");
			Cursor("Highlight");
			UseVar("network.session.ivar13");
			SetIntegerRange("network.session.ivar13", 0, 99999);
		}


		CreateControl("TLILabel", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 160);
			Size(390, 18);
			Font("SMALL");
			Text("Target Lead Indicator:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("TLION", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(400, 160);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar29");
			Value(1);
		}

		CreateControl("TLIOFF", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(460, 160);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar29");
			Value(0);
		}
		
		CreateControl("BotTitle", "STATIC")
		{
			Position(0, 240);
			Size(200, 20);
			Style("TRANSPARENT");
			Font("SMALL");
			JustifyText("LEFT");
			Text("CPU Bots");
		}

		CreateControl("BotSlider", "SLIDER")
		{
			// ColorGroup("LISTBOX");
			ColorGroup("BLACKBLUE");
			// ColorGroup("MAGENTA");
			Position(190, 240);
			Size(300, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER");
			Cursor("Highlight");
			UseVar("network.session.ivar9");
		}

		CreateControl("BotValue", "STATIC")
		{
			Position(500, 240);
			Size(100, 18);
			Style("TRANSPARENT");
			Font("TINY");
			JustifyText("LEFT");
			Text("%d");
			UseVar("network.session.ivar9");
		}

		CreateControl("CPUNonTurretSkill", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 280);
			Size(270, 18);
			Font("SMALL");
			Text("Bot skill:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("CPUNonTurretSkill0", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(280, 280);
			Size(26, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("0");
			UseVar("network.session.ivar22");
			Value(0);
		}

		CreateControl("CPUNonTurretSkill1", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(320, 280);
			Size(26, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("1");
			UseVar("network.session.ivar22");
			Value(1);
		}

		CreateControl("CPUNonTurretSkill2", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(360, 280);
			Size(26, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("2");
			UseVar("network.session.ivar22");
			Value(2);
		}

		CreateControl("NonTurretSkill3", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(400, 280);
			Size(26, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("3");
			UseVar("network.session.ivar22");
			Value(3);
		}

		CreateControl("NonTurretSkill3", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(440, 280);
			Size(86, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Random");
			UseVar("network.session.ivar22");
			Value(4);
		}

		CreateControl("VsBotsLabel", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 360);
			Size(390, 18);
			Font("SMALL");
			Text("Humans vs bots:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("VsBotsOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(400, 360);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar16");
			Value(0);
		}

		CreateControl("VsBotsOn", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(460, 360);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar16");
			Value(1);
		}

		CreateControl("RabbitTitle", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 420);
			Size(390, 18);
			Font("SMALL");
			Text("Rabbit (Tag) mode:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("RabbitOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(400, 420);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar23");
			Value(0);
		}

		CreateControl("RabbitOn", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(460, 420);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar23");
			Value(1);
		}

		CreateControl("ShipOnlyTitle", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 480);
			Size(390, 18);
			Font("SMALL");
			Text("Craft only mode (no pilots):");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("ShipOnlyOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(400, 480);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar25");
			Value(0);
		}

		CreateControl("ShipOnlyOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(460, 480);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar25");
			Value(1);
		}

		CreateControl("WeenieTitle", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 540);
			Size(390, 18);
			Font("SMALL");
			Text("1-shot kill mode:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("WeenieOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(400, 540);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar19");
			Value(0);
		}

		CreateControl("WeenieOn", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(460, 540);
			Size(38, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar19");
			Value(1);
		}

		CreateControl("MultTitle", "STATIC")
		{
			Position(0, 580);
			Size(200, 20);
			Style("TRANSPARENT");
			Font("SMALL");
			JustifyText("LEFT");
			Text("Damage Mult");
		}

		CreateControl("MultSlider", "SLIDER")
		{
			// ColorGroup("LISTBOX");
			ColorGroup("BLACKBLUE");
			// ColorGroup("MAGENTA");
			Position(190, 580);
			Size(300, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER");
			Cursor("Highlight");
			UseVar("network.session.ivar26");
		}

		CreateControl("MultValue", "STATIC")
		{
			Position(500, 580);
			Size(100, 18);
			Style("TRANSPARENT");
			Font("TINY");
			JustifyText("LEFT");
			Text("%d0%%");
			UseVar("network.session.ivar26");
		}

		CreateControl("AnimalTitle", "STATIC")
		{
			Position(0, 620);
			Size(200, 20);
			Style("TRANSPARENT");
			Font("SMALL");
			JustifyText("LEFT");
			Text("Animals");
		}

		CreateControl("AnimalSlider", "SLIDER")
		{
			// ColorGroup("LISTBOX");
			ColorGroup("BLACKBLUE");
			// ColorGroup("MAGENTA");
			Position(190, 620);
			Size(300, 18);
			BorderSize(6);
			BevelSize(6);
			Style("ROLLOVER");
			Cursor("Highlight");
			UseVar("network.session.ivar27");
		}

		CreateControl("AnimalValue", "STATIC")
		{
			Position(500, 620);
			Size(100, 18);
			Style("TRANSPARENT");
			Font("TINY");
			JustifyText("LEFT");
			Text("%d");
			UseVar("network.session.ivar27");
		}


		CreateControl("AnimalListWindow", "WINDOW")
		{
			ColorGroup("MAGENTA");
			Position(10, 700);
			Size(520, 56);
			Style("INERT"); //  "TRANSPARENT"
			Geometry("LEFT", "TOP");
			BorderSize(20);
			BevelSize(10);
			TabSize(280, 20);
			Title("Select animal to use:");
			TitleFont("SMALL");
			Style("RIGHTTAB", "OUTLINE");

			CreateControl("AnimalList", "LISTBOX")
			{
				ColorGroup("LISTBOX");
				Geometry("TOP", "LEFT");
				Position(0, 0);
				Size(520, 60);
				CellSize(500, 20);
				BorderSize(10);
				BevelSize(6);
				Style("VSLIDER");
				Font("TINY");
				Cursor("Highlight");
				UseVar("network.session.svar12");
				// Contents of this list filled in automatically from code [NetCommands.cpp]
			}
		}


		OnEvent("CloseExtra")
		{
			Cmd("network.session.closeextras");
		}
}

