// ================
// 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.  Page layout buttons improved by GSH.
// Changes
//  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(-60, 180);
	Size(810, 1200);
	BorderSize(30);
	BevelSize(15);
	TabSize(330, 30);
	Title("ST Options");
	TitleFont("SMALL");
	Style("RIGHTTAB", "OUTLINE");

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

	CreateControl("TimeEdit", "EDIT")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 0);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		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, 60);
		Size(525, 27);
		Font("SMALL");
		Text("Kill Limit:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("KillEdit", "EDIT")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 60);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		JustifyText("RIGHT");
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("network.session.ivar0");
		SetIntegerRange("network.session.ivar0", 0, 99999);
	}

	CreateControl("UnitLimit", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 120);
		Size(525, 27);
		Font("SMALL");
		Text("Unit Limit:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("UnitEdit", "EDIT")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 120);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		JustifyText("RIGHT");
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("network.session.ivar9");
	}

	CreateControl("PilotLifeTime", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 180);
		Size(525, 27);
		Font("SMALL");
		Text("Pilot lifespan (seconds):");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("PilotLifeTime", "EDIT")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 180);
		Size(57, 27); // (50, 9)
		BorderSize(9);
		BevelSize(9);
		JustifyText("RIGHT");
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("network.session.ivar28");
		SetIntegerRange("network.session.ivar28", 0, 99999);
	}

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

	CreateControl("SniperRespawnOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 240);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar16");
		Value(0);
	}

	CreateControl("SniperRespawnOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(630, 240);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar16");
		Value(1);
	}

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

	CreateControl("PointsForKillOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 300);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar14");
		Value(0);
	}

	CreateControl("PointsForKillOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(630, 300);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar14");
		Value(1);
	}

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

	CreateControl("KillForKillOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 360);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar15");
		Value(0);
	}

	CreateControl("KillForKillOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(630, 360);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar15");
		Value(1);
	}

	CreateControl("TLI", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 420);
		Size(525, 27);
		Font("SMALL");
		Text("Target Lead Indicator:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("TLIOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 420);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar29");
		Value(1);
	}

	CreateControl("TLIOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(630, 420);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar29");
		Value(0);
	}

	CreateControl("LinkLabel", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 480);
		Size(525, 27);
		Font("SMALL");
		Text("Weapon Linking:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("LinkOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 480);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "OUTLINE", "RADIO");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar30");
		Value(0);		 
	}

	CreateControl("LinkOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(630, 480);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "OUTLINE","RADIO");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar30");
		Value(1);		
	}

	CreateControl("Friendly Fire", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 540);
		Size(525, 27);
		Font("SMALL");
		Text("Friendly Fire:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("FriendlyFireOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 540);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar32");
		Value(0);
	}

	CreateControl("FriendlyFireOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(630, 540);
		Size(57, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar32");
		Value(1);
	}

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

	CreateControl("TurretSkill0", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 600);
		Size(39, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("0");
		UseVar("network.session.ivar17");
		Value(0);
	}

	CreateControl("TurretSkill1", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(600, 600);
		Size(39, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("1");
		UseVar("network.session.ivar17");
		Value(1);
	}

	CreateControl("TurretSkill2", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(660, 600);
		Size(39, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("2");
		UseVar("network.session.ivar17");
		Value(2);
	}

	CreateControl("TurretSkill3", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(720, 600);
		Size(39, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("3");
		UseVar("network.session.ivar17");
		Value(3);
	}

	CreateControl("NonTurretSkill", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 660);
		Size(525, 27);
		Font("SMALL");
		Text("Non-Turret AI skill:");
		JustifyText("right");
		Style("TRANSPARENT");
	}
	
	CreateControl("NonTurretSkill0", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 660);
		Size(39, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("0");
		UseVar("network.session.ivar18");
		Value(0);
	}

	CreateControl("NonTurretSkill1", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(600, 660);
		Size(39, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("1");
		UseVar("network.session.ivar18");
		Value(1);
	}

	CreateControl("NonTurretSkill2", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(660, 660);
		Size(39, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("2");
		UseVar("network.session.ivar18");
		Value(2);
	}

	CreateControl("NonTurretSkill3", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(720, 660);
		Size(39, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("3");
		UseVar("network.session.ivar18");
		Value(3);
	}

	CreateControl("StartingForce", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 720); // 65
		Size(525, 27); // 125
		Font("SMALL");
		Text("Starting Force:");
		JustifyText("right"); // left
		Style("TRANSPARENT");
	}

	CreateControl("StartForce0", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(540, 720);
		Size(120, 27); // 
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "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(690, 720);
		Size(120, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("2 Turrets");
		UseVar("network.session.ivar7");
		Value(2);
	}

	CreateControl("RecyProtectTitle", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 780);
		Size(525, 27);
		Font("SMALL");
		Text("Recycler protection:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("RecyProtectSlider", "SLIDER")
	{
		// ColorGroup("LISTBOX");
		ColorGroup("BLACKBLUE");
		// ColorGroup("MAGENTA");
		Position(285, 840); // (95, 235)
		Size(450, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER");
		Cursor("Highlight");
		UseVar("network.session.ivar25");
	}

	CreateControl("RecyProtectValue", "STATIC")
	{
		Position(600, 780);
		Size(225, 27);
		Style("TRANSPARENT");
		Font("TINY");
		JustifyText("LEFT");
		Text("%d minutes");
		UseVar("network.session.ivar25");
	}

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

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

	CreateControl("PagesLabel", "STATIC")
	{
		Geometry("LEFT", "BOTTOM");
		Position(420, 0);
		Size(180, 27);
		Font("TINY");
		Text("More Pages:");
		JustifyText("left");
		Style("TRANSPARENT");
	}

	CreateControl("OpenExtraOptions2", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("BOTTOM", "LEFT");
		Position(630, 0);
		Size(60, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Font("SMALL");
		Text("2");
		NotifyParent("Button::Press", "OpenExtraOptions2");
	}	
	OnEvent("OpenExtraOptions2")
	{
		FadeOut("|ExtraOptions");
		FadeIn("|ExtraOptions2");
	}
	
}

// Pull in the other pages as well. Do this all at once so the exe can
// fill in all the listboxes we use.
Exec("bzshell_multi_fest2_x3_0.cfg");
