// ================
// 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(-30, 90);
	Size(405, 600);
	BorderSize(15);
	BevelSize(8);
	TabSize(165, 15);
	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(210, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Server options");
			NotifyParent("Button::Press", "CloseExtra");
		}

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

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

		CreateControl("KillLimit", "STATIC")
		{
			Geometry("LEFT", "TOP");
			ColorGroup("MAGENTA");
			Position(0, 30);
			Size(293, 14);
			Font("SMALL");
			Text("Kill Limit:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("KillEdit", "EDIT")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(300, 30);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			JustifyText("RIGHT");
			Font("TINY");
			Style("ROLLOVER", "OUTLINE", "INERT");
			Cursor("Highlight");
			UseVar("network.session.ivar0");
			SetIntegerRange("network.session.ivar0", 0, 99999);
		}

		CreateControl("RandomizeType", "STATIC")
		{
			Geometry("LEFT", "TOP");
			ColorGroup("MAGENTA");
			Position(0, 60);
			Size(203, 14);
			Font("SMALL");
			Text("Respawn Vehicle:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("RandomizeFixed", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(210, 60);
			Size(44, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("Fixed");
			UseVar("network.session.randomizetype");
			Value(0);
		}

		CreateControl("RandomizeRace", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(270, 60);
			Size(44, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("Race");
			UseVar("network.session.randomizetype");
			Value(1);
		}

		CreateControl("RandomizeAny", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(330, 60);
			Size(44, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("Any");
			UseVar("network.session.randomizetype");
			Value(2);
		}

		CreateControl("SpawnkillLimit", "STATIC")
		{
			Geometry("LEFT", "TOP");
			ColorGroup("MAGENTA");
			Position(0, 90);
			Size(338, 14);
			Font("SMALL");
			Text("Spawnkill if under (seconds):");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("SpawnkillEdit", "EDIT")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(345, 90);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			JustifyText("RIGHT");
			Font("TINY");
			Style("ROLLOVER", "OUTLINE", "INERT");
			Cursor("Highlight");
			UseVar("network.session.ivar13");
			SetIntegerRange("network.session.ivar13", 0, 99999);
		}


		CreateControl("TLILabel", "STATIC")
		{
			Geometry("LEFT", "TOP");
			ColorGroup("MAGENTA");
			Position(0, 120);
			Size(293, 14);
			Font("SMALL");
			Text("Target Lead Indicator:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("TLION", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(300, 120);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar29");
			Value(1);
		}

		CreateControl("TLIOFF", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(345, 120);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar29");
			Value(0);
		}

		
		CreateControl("BotTitle", "STATIC")
		{
			Position(0, 180);
			ColorGroup("MAGENTA");
			Size(150, 15);
			Style("TRANSPARENT");
			Font("SMALL");
			JustifyText("LEFT");
			Text("CPU Bots");
		}

		CreateControl("BotSlider", "SLIDER")
		{
			// ColorGroup("LISTBOX");
			ColorGroup("BLACKBLUE");
			// ColorGroup("MAGENTA");
			Position(143, 180);
			Size(225, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "INERT");
			Cursor("Highlight");
			UseVar("network.session.ivar9");
		}

		CreateControl("BotValue", "STATIC")
		{
			Position(375, 180);
			ColorGroup("MAGENTA");
			Size(75, 14);
			Style("TRANSPARENT");
			Font("TINY");
			JustifyText("LEFT");
			Text("%d");
			UseVar("network.session.ivar9");
		}

		CreateControl("CPUNonTurretSkill", "STATIC")
		{
			Geometry("LEFT", "TOP");
			ColorGroup("MAGENTA");
			Position(0, 210);
			Size(203, 14);
			Font("SMALL");
			Text("Bot skill:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("CPUNonTurretSkill0", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(210, 210);
			Size(20, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("0");
			UseVar("network.session.ivar22");
			Value(0);
		}

		CreateControl("CPUNonTurretSkill1", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(240, 210);
			Size(20, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("1");
			UseVar("network.session.ivar22");
			Value(1);
		}

		CreateControl("CPUNonTurretSkill2", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(270, 210);
			Size(20, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("2");
			UseVar("network.session.ivar22");
			Value(2);
		}

		CreateControl("NonTurretSkill3", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(300, 210);
			Size(20, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("3");
			UseVar("network.session.ivar22");
			Value(3);
		}

		CreateControl("NonTurretSkill3", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(330, 210);
			Size(65, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("Random");
			UseVar("network.session.ivar22");
			Value(4);
		}

		CreateControl("VsBotsLabel", "STATIC")
		{
			Geometry("LEFT", "TOP");
			ColorGroup("MAGENTA");
			Position(0, 270);
			Size(293, 14);
			Font("SMALL");
			Text("Humans vs bots:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("VsBotsOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(300, 270);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar16");
			Value(0);
		}

		CreateControl("VsBotsOn", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(345, 270);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar16");
			Value(1);
		}

		CreateControl("RabbitTitle", "STATIC")
		{
			Geometry("LEFT", "TOP");
			ColorGroup("MAGENTA");
			Position(0, 315);
			Size(293, 14);
			Font("SMALL");
			Text("Rabbit (Tag) mode:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("RabbitOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(300, 315);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar23");
			Value(0);
		}

		CreateControl("RabbitOn", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(345, 315);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar23");
			Value(1);
		}

		CreateControl("ShipOnlyTitle", "STATIC")
		{
			Geometry("LEFT", "TOP");
			ColorGroup("MAGENTA");
			Position(0, 360);
			Size(293, 14);
			Font("SMALL");
			Text("Craft only mode (no pilots):");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("ShipOnlyOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(300, 360);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar25");
			Value(0);
		}

		CreateControl("ShipOnlyOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(345, 360);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar25");
			Value(1);
		}

		CreateControl("WeenieTitle", "STATIC")
		{
			Geometry("LEFT", "TOP");
			ColorGroup("MAGENTA");
			Position(0, 405);
			Size(293, 14);
			Font("SMALL");
			Text("1-shot kill mode:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("WeenieOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(300, 405);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("Off");
			UseVar("network.session.ivar19");
			Value(0);
		}

		CreateControl("WeenieOn", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(345, 405);
			Size(29, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "RADIO", "OUTLINE", "INERT");
			Cursor("Highlight");
			Font("TINY");
			Text("On");
			UseVar("network.session.ivar19");
			Value(1);
		}

		CreateControl("MultTitle", "STATIC")
		{
			Position(0, 435);
			ColorGroup("MAGENTA");
			Size(150, 15);
			Style("TRANSPARENT");
			Font("SMALL");
			JustifyText("LEFT");
			Text("Damage Mult");
		}

		CreateControl("MultSlider", "SLIDER")
		{
			// ColorGroup("LISTBOX");
			ColorGroup("BLACKBLUE");
			// ColorGroup("MAGENTA");
			Position(143, 435);
			Size(225, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "INERT");
			Cursor("Highlight");
			UseVar("network.session.ivar26");
		}

		CreateControl("MultValue", "STATIC")
		{
			Position(375, 435);
			ColorGroup("MAGENTA");
			Size(75, 14);
			Style("TRANSPARENT");
			Font("TINY");
			JustifyText("LEFT");
			Text("%d0%%");
			UseVar("network.session.ivar26");
		}

		CreateControl("AnimalTitle", "STATIC")
		{
			Position(0, 465);
			ColorGroup("MAGENTA");
			Size(150, 15);
			Style("TRANSPARENT");
			Font("SMALL");
			JustifyText("LEFT");
			Text("Animals");
		}

		CreateControl("AnimalSlider", "SLIDER")
		{
			// ColorGroup("LISTBOX");
			ColorGroup("BLACKBLUE");
			// ColorGroup("MAGENTA");
			Position(143, 465);
			Size(225, 14);
			BorderSize(5);
			BevelSize(5);
			Style("ROLLOVER", "INERT");
			Cursor("Highlight");
			UseVar("network.session.ivar27");
		}

		CreateControl("AnimalValue", "STATIC")
		{
			Position(375, 465);
			ColorGroup("MAGENTA");
			Size(75, 14);
			Style("TRANSPARENT");
			Font("TINY");
			JustifyText("LEFT");
			Text("%d");
			UseVar("network.session.ivar27");
		}


		CreateControl("AnimalListWindow", "WINDOW")
		{
			ColorGroup("MAGENTA");
			Position(8, 525);
			Size(390, 42);
			Style("INERT"); //  "TRANSPARENT"
			Geometry("LEFT", "TOP");
			BorderSize(15);
			BevelSize(8);
			TabSize(210, 15);
			Title("Select animal to use:");
			TitleFont("SMALL");
			Style("RIGHTTAB", "OUTLINE");

			CreateControl("AnimalList", "LISTBOX")
			{
				ColorGroup("LISTBOX");
				Geometry("TOP", "LEFT");
				Position(0, 0);
				Size(390, 45);
				CellSize(375, 15);
				BorderSize(8);
				BevelSize(5);
				Style("VSLIDER", "INERT");
				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");
		}
}

