// ================
// BATTLEZONE SHELL
// ================

//
// Mission-specific interface. Top-level entry must be named
// "ExtraOptions"
//
CreateControl("ExtraOptions", "WINDOW")
{
	ColorGroup("MAGENTA");
	Geometry("RIGHT", "TOP");
	Position(-20, 60);
	Size(270, 400);
	BorderSize(10);
	BevelSize(5);
	TabSize(110, 10);
	Title("Strat Options");
	TitleFont("SMALL");
	Style("RIGHTTAB", "OUTLINE");

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

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

	CreateControl("TimeEdit", "STATIC")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 0);
			Size(19, 9);
			BorderSize(3);
			BevelSize(3);
			JustifyText("RIGHT");
			Font("TINY");
			Style("INERT", "OUTLINE");
			Cursor("Highlight");
			UseVar("network.session.ivar1");
			SetIntegerRange("network.session.ivar1", 0, 99999);
		}

	CreateControl("KillLimit", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 20);
			Size(135, 9);
			Font("SMALL");
			Text("Kill Limit:");
			JustifyText("left");
			Style("TRANSPARENT");
		}

	CreateControl("KillEdit", "STATIC")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 20);
			Size(19, 9);
			BorderSize(3);
			BevelSize(3);
			JustifyText("RIGHT");
			Font("TINY");
			Style("INERT", "OUTLINE");
			Cursor("Highlight");
			UseVar("network.session.ivar0");
			SetIntegerRange("network.session.ivar0", 0, 99999);
		}

	CreateControl("UnitLimit", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 40);
			Size(135, 9);
			Font("SMALL");
			Text("Unit Limit:");
			JustifyText("Left");
			Style("TRANSPARENT");
		}

	CreateControl("UnitEdit", "STATIC")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 40);
			Size(19, 9);
			BorderSize(3);
			BevelSize(3);
			JustifyText("RIGHT");
			Font("TINY");
			Style("INERT", "OUTLINE");
			Cursor("Highlight");
			UseVar("network.session.ivar9");
		}

	CreateControl("SniperRespawn", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 60);
			Size(135, 9);
			Font("SMALL");
			Text("Respawn w/ sniper:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("SniperRespawnOn", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 60);
			Size(19, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("N");
			UseVar("network.session.ivar16");
			Value(0);
		}

		CreateControl("SniperRespawnOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(165, 60);
			Size(19, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Y");
			UseVar("network.session.ivar16");
			Value(1);
		}

		//
	CreateControl("PointsForKill", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 80);
			Size(135, 9);
			Font("SMALL");
			Text("Points for AI kill:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("PointsForKillOn", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 80);
			Size(19, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("N");
			UseVar("network.session.ivar14");
			Value(0);
		}

		CreateControl("PointsForKillOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(165, 80);
			Size(19, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Y");
			UseVar("network.session.ivar14");
			Value(1);
		}

	CreateControl("KillForKill", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 100);
			Size(135, 9);
			Font("SMALL");
			Text("Kill for AI kill:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("KillForKillOn", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 100);
			Size(19, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("N");
			UseVar("network.session.ivar15");
			Value(0);
		}

		CreateControl("KillForKillOff", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(165, 100);
			Size(19, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Y");
			UseVar("network.session.ivar15");
			Value(1);
		}

		//
	CreateControl("TurretSkill", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 120);
			Size(135, 9);
			Font("SMALL");
			Text("Turret AI skill:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("TurretSkill0", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 120);
			Size(13, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("0");
			UseVar("network.session.ivar17");
			Value(0);
		}

		CreateControl("TurretSkill1", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(160, 120);
			Size(13, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("1");
			UseVar("network.session.ivar17");
			Value(1);
		}

		CreateControl("TurretSkill2", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(180, 120);
			Size(13, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("2");
			UseVar("network.session.ivar17");
			Value(2);
		}

		CreateControl("TurretSkill3", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(200, 120);
			Size(13, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("3");
			UseVar("network.session.ivar17");
			Value(3);
		}

	CreateControl("NonTurretSkill", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 140);
			Size(135, 9);
			Font("SMALL");
			Text("Non-Turret AI skill:");
			JustifyText("right");
			Style("TRANSPARENT");
		}

		CreateControl("NonTurretSkill0", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 140);
			Size(13, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("0");
			UseVar("network.session.ivar18");
			Value(0);
		}

		CreateControl("NonTurretSkill1", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(160, 140);
			Size(13, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("1");
			UseVar("network.session.ivar18");
			Value(1);
		}

		CreateControl("NonTurretSkill2", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(180, 140);
			Size(13, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("2");
			UseVar("network.session.ivar18");
			Value(2);
		}

		CreateControl("NonTurretSkill3", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(200, 140);
			Size(13, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("3");
			UseVar("network.session.ivar18");
			Value(3);
		}

	CreateControl("StartingForce", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 160);
			Size(125, 9);
			Font("SMALL");
			Text("Starting Force:");
			JustifyText("left");
			Style("TRANSPARENT");
		}

	CreateControl("StartForce0", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(120, 160);
			Size(50, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("None");
			UseVar("network.session.ivar7");
			Value(0);
			NotifyParent("Button::Press", "SetStartForce0");
		}

	CreateControl("StartForce1", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(180, 160);
			Size(50, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("TINY");
			Text("Turrets");
			UseVar("network.session.ivar7");
			Value(2);
		}


	// This window (ExtraOptions.OnlyInFFA, name must match exactly) is
	// disabled if teamplay is on
	CreateControl("OnlyInFFA", "WINDOW")
	{
		ColorGroup("MAGENTA");
		Position(5, 260);
		Size(260, 115);
		Style("INERT"); //  "TRANSPARENT"
		Geometry("LEFT", "TOP");
		BorderSize(10);
		BevelSize(5);
		TabSize(110, 10);
		Title("Alliances");
		TitleFont("SMALL");
		Style("RIGHTTAB", "OUTLINE");

		CreateControl("Team1Prefix", "STATIC")
			{
				Position(0, 0);
				Size(15, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("RIGHT");
				Text("1:");
			}

		CreateControl("Team1Player", "STATIC")
			{
				Position(15, 0);
				Size(115, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("Left");
				Text("%s");
				UseVar("network.stats.team1player");
			}

		CreateControl("Team2Prefix", "STATIC")
			{
				Position(130, 0);
				Size(15, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("RIGHT");
				Text("2:");
			}

		CreateControl("Team2Player", "STATIC")
			{
				Position(145, 0);
				Size(115, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("Left");
				Text("%s");
				UseVar("network.stats.team2player");
			}

		CreateControl("Team3Prefix", "STATIC")
			{
				Position(0, 20);
				Size(15, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("RIGHT");
				Text("3:");
			}

		CreateControl("Team3Player", "STATIC")
			{
				Position(15, 20);
				Size(115, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("Left");
				Text("%s");
				UseVar("network.stats.team3player");
			}

		CreateControl("Team4Prefix", "STATIC")
			{
				Position(130, 20);
				Size(15, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("RIGHT");
				Text("4:");
			}

		CreateControl("Team4Player", "STATIC")
			{
				Position(145, 20);
				Size(115, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("Left");
				Text("%s");
				UseVar("network.stats.team4player");
			}

		CreateControl("Team5Prefix", "STATIC")
			{
				Position(0, 40);
				Size(15, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("RIGHT");
				Text("5:");
			}

		CreateControl("Team5Player", "STATIC")
			{
				Position(15, 40);
				Size(115, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("Left");
				Text("%s");
				UseVar("network.stats.team5player");
			}

		CreateControl("Team6Prefix", "STATIC")
			{
				Position(130, 40);
				Size(15, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("RIGHT");
				Text("6:");
			}

		CreateControl("Team6Player", "STATIC")
			{
				Position(145, 40);
				Size(115, 9);
				Style("TRANSPARENT");
				Font("SMALL");
				JustifyText("Left");
				Text("%s");
				UseVar("network.stats.team6player");
			}

		CreateControl("FFA", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(10, 70);
			Size(110, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("SMALL");
			Text("Free For All");
			UseVar("network.session.ivar23");
			Value(0);
		}

		CreateControl("12vs34", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 70);
			Size(110, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("SMALL");
			Text("1+2 vs 3+4");
			UseVar("network.session.ivar23");
			Value(1);
		}

		CreateControl("13vs24", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(10, 90);
			Size(110, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("SMALL");
			Text("1+3 vs 2+4");
			UseVar("network.session.ivar23");
			Value(2);
		}

		CreateControl("12vs34", "BUTTON")
		{
			ColorGroup("BLACKBLUE");
			Geometry("LEFT", "TOP");
			Position(140, 90);
			Size(110, 9);
			BorderSize(3);
			BevelSize(3);
			Style("INERT", "RADIO", "OUTLINE");
			Cursor("Highlight");
			Font("SMALL");
			Text("1+4 vs 2+3");
			UseVar("network.session.ivar23");
			Value(3);
		}

		CreateControl("56Comment", "STATIC")
		{
			Geometry("LEFT", "TOP");
			Position(0, 110);
			Size(260, 12);
			Font("SMALL");
			Text("Teams 5 and 6 are always solo");
			JustifyText("center");
			Style("TRANSPARENT");
		}
	} // End of OnlyInFFA

	// This window (ExtraOptions.OnlyInTeamplay, name must match
	// exactly) is disabled if teamplay is off
	CreateControl("OnlyInTeamplay", "WINDOW")
  {
		Position(5, 240);
		Size(260, 100);
		Style("TRANSPARENT", "INERT");
		Geometry("RIGHT", "TOP");
		// Nothing else in here (for now?)
	}


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

