// ==================================================================================================================
// Battlezone II Shell File -- Page 3
// ==================================================================================================================

CreateControl("ExtraOptions3", "WINDOW")
{
	ColorGroup("MAGENTA");
	Geometry("RIGHT", "TOP");
	Position(-60, 180);
	Size(810, 1200);
	BorderSize(30);
	BevelSize(15);
	TabSize(330, 30);
	Title("Extra Options");
	TitleFont("SMALL");
	Style("RIGHTTAB", "OUTLINE");
	
	CreateControl("AIPListWindow", "WINDOW")
	{
		ColorGroup("MAGENTA");
		Position(15, 75);
		Size(780, 174); // (260, 98)
		Style("INERT"); //  "TRANSPARENT"
		Geometry("LEFT", "TOP");
		BorderSize(30);
		BevelSize(15);
		TabSize(420, 30);
		Title("AIP set (CPU's plans)");
		TitleFont("SMALL");
		Style("RIGHTTAB", "OUTLINE");

		CreateControl("AIPList", "LISTBOX")
		{
			ColorGroup("LISTBOX");
			Geometry("TOP", "LEFT");
			Position(0, 0);
			Size(780, 180); // (260, 60)
			CellSize(750, 30);
			BorderSize(15);
			BevelSize(9);
			Style("VSLIDER");
			Font("TINY");
			Cursor("Highlight");
			UseVar("network.session.svar3");
			// Contents of this list filled in automatically from code [NetCommands.cpp]
		}
	}
	
	CreateControl("AIPDescButton", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		JustifyText("CENTER");
		Position(120, 0);  // (153, 150)
		Size(120, 27);
		BorderSize(9);
		BevelSize(9);
		Font("Tiny");
		Text("AIP Info");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		NotifyParent("Button::Press", "AIPDescButton");
	}

	OnEvent("AIPDescButton")
	{
		Exec("AIPDesc_x3_0.cfg");
		FadeIn("|AIPDescPage");
	}

	CreateControl("DiffLevel", "STATIC")
	{
//		Geometry("LEFT", "TOP");
//		Position(-16, 120);
		Position(6, 315);
		Size(210, 27);
		Font("SMALL");
		Text("Difficulty:");
		JustifyText("LEFT");
		Style("TRANSPARENT");
	}

	CreateControl("DiffLvlEasy", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(240, 315);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Easy");
		UseVar("network.session.ivar119");
		Value(0);
		NotifyParent("Button::Press", "SetDifficultyLevelEasy");
	}

	OnEvent("SetDifficultyLevelEasy")
	{
		Cmd("network.session.ivar119 0");
	}


	CreateControl("DiffLvlLow", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(375, 315);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Low");
		UseVar("network.session.ivar119");
		Value(2);
		NotifyParent("Button::Press", "SetDifficultyLevelLow");
	}

	OnEvent("SetDifficultyLevelLow")
	{
		Cmd("network.session.ivar119 2");
	}

	CreateControl("DiffLvlNormal", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(510, 315);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Normal");
		UseVar("network.session.ivar119");
		Value(4);
		NotifyParent("Button::Press", "SetDifficultyLevelNormal");
	}

	OnEvent("SetDifficultyLevelNormal")
	{
		Cmd("network.session.ivar119 4");
	}

	CreateControl("DiffLvlHigh", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(645, 315);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Hard");
		UseVar("network.session.ivar119");
		Value(8);
		NotifyParent("Button::Press", "SetDifficultyLevelHigh");
	}

	OnEvent("SetDifficultyLevelHigh")
	{
		Cmd("network.session.ivar119 8");
	}


	// CreateControl("AIPTypes", "STATIC")
	// {
		// Geometry("LEFT", "TOP");
// //		Position(-16, 120);
		// Position(10, 280);
		// Size(70, 9);
		// Font("SMALL");
		// Text("AIP Type:");
		// JustifyText("LEFT");
		// Style("TRANSPARENT");
	// }

	// CreateControl("NewAIP", "BUTTON")
	// {
		// ColorGroup("BLACKBLUE");
		// Geometry("LEFT", "TOP");
		// Position(80, 280);
		// Size(35, 9);
		// BorderSize(3);
		// BevelSize(3);
		// Style("ROLLOVER", "RADIO", "OUTLINE");
		// Cursor("Highlight");
		// Font("TINY");
		// Text("New");
		// UseVar("network.session.ivar118");
		// Value(0);
		// NotifyParent("Button::Press", "SetAIPTypeNew");
	// }

	// OnEvent("SetAIPTypeNew")
	// {
		// Cmd("network.session.ivar118 0");
	// }


	// CreateControl("OldAIP", "BUTTON")
	// {
		// ColorGroup("BLACKBLUE");
		// Geometry("LEFT", "TOP");
		// Position(125, 280);
		// Size(35, 9);
		// BorderSize(3);
		// BevelSize(3);
		// Style("ROLLOVER", "RADIO", "OUTLINE");
		// Cursor("Highlight");
		// Font("TINY");
		// Text("Old");
		// UseVar("network.session.ivar118");
		// Value(2);
		// NotifyParent("Button::Press", "SetAIPTypeOld");
	// }

	// OnEvent("SetAIPTypeOld")
	// {
		// Cmd("network.session.ivar118 2");
	// }

	CreateControl("MonsterRun", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(30, 465);
		Size(210, 27);
		Font("SMALL");
		Text("Monster:");
		JustifyText("LEFT");
		Style("TRANSPARENT");
	}

	CreateControl("MonsterOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(240, 465);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar123");
		Value(0);
		NotifyParent("Button::Press", "SetMonsterOff");
	}

	OnEvent("SetMonsterOff")
	{
		Cmd("network.session.ivar123 0");
	}

	CreateControl("MonsterOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(375, 465);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar123");
		Value(1);
		NotifyParent("Button::Press", "SetMonsterOn");
	}

	OnEvent("SetMonsterOn")
	{
		Cmd("network.session.ivar123 1");
	}


	//FE_MPI Revision D Rampage Control

	CreateControl("RampageCaption", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(39, 540);
		Size(315, 27);
		Font("SMALL");
		Text("Rampage Units:");
		JustifyText("LEFT");
		Style("TRANSPARENT");
	}

	CreateControl("RampageLimitEdit", "EDIT")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(375, 540);
		Size(105, 27); // (50, 9)
		BorderSize(9);
		BevelSize(9);
		JustifyText("RIGHT");
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("network.session.ivar120");
		SetIntegerRange("network.session.ivar120", 0, 36);
	}
	
	CreateControl("ExtraPools", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(-6, 615);
		Size(225, 27);
		Font("Small");
		Text("Add Pools:");
		JustifyText("LEFT");
		Style("TRANSPARENT");
	}

	CreateControl("ExtraPoolsOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(240, 615);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar122");
		Value(0);
		NotifyParent("Button::Press", "SetPoolsOff");
	}

	OnEvent("SetPoolsOff")
	{
		Cmd("network.session.ivar122 0");
	}

	CreateControl("ExtraPoolsOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(375, 615);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar122");
		Value(1);
		NotifyParent("Button::Press", "SetPoolsOn");
	}

	OnEvent("SetPoolsOn")
	{
		Cmd("network.session.ivar122 1");
	}


	CreateControl("Capture", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(15, 690);
		Size(210, 27);
		Font("SMALL");
		Text("Artifact:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("CaptureOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(240, 690);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar124");
		Value(0);
		NotifyParent("Button::Press", "CaptureOff");
	}

	OnEvent("CaptureOff")
	{
		Cmd("network.session.ivar124 0");
	}

	CreateControl("CaptureOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(375, 690);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar124");
		Value(1);
		NotifyParent("Button::Press", "CaptureOn");
	}

	OnEvent("CaptureOn")
	{
		Cmd("network.session.ivar124 0");
	}


	CreateControl("SpawnCrates", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(15, 765);
		Size(210, 27);
		Font("SMALL");
		Text("Crates:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("SpawnCratesOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(240, 765);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar121");
		Value(0);
		NotifyParent("Button::Press", "CratesOff");
	}

	OnEvent("CratesOff")
	{
		Cmd("network.session.ivar121 0");
	}

	CreateControl("SpawnCratesOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(375, 765);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar121");
		Value(1);
		NotifyParent("Button::Press", "CratesOn");
	}

	OnEvent("CratesOn")
	{
		Cmd("network.session.ivar121 0");
	}

	CreateControl("CPUStartingForceSize", "STATIC")
	{
//		Geometry("LEFT", "TOP");
//		Position(-16, 120);
		Position(-12, 390);
		Size(231, 27);
		Font("SMALL");
		Text("CPU Force:");
		JustifyText("LEFT");
		Style("TRANSPARENT");
	}

	CreateControl("CPUStartingForceSizeSmall;", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(240, 390);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Small");
		UseVar("network.session.ivar127");
		Value(0);
		NotifyParent("Button::Press", "SetDifficultyLevelSmall");
	}

	OnEvent("SetCPUStartingForceSizeSmall")
	{
		Cmd("network.session.ivar127 0");
	}


	CreateControl("CPUStartingForceNormal", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(375, 390);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Normal");
		UseVar("network.session.ivar127");
		Value(2);
		NotifyParent("Button::Press", "SetDifficultyLevelNormal");
	}

	OnEvent("SetCPUStartingForceSizeNormal")
	{
		Cmd("network.session.ivar127 2");
	}
	
	CreateControl("CPUStartingForceSizeLarge", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(510, 390);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Large");
		UseVar("network.session.ivar127");
		Value(4);
		NotifyParent("Button::Press", "SetDifficultyLevelLarge");
	}

	OnEvent("SetCPUStartingForceSizeLarge")
	{
		Cmd("network.session.ivar127 4");
	}

	CreateControl("CPUStartingForceSizeHuge", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(645, 390);
		Size(105, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Huge");
		UseVar("network.session.ivar127");
		Value(8);
		NotifyParent("Button::Press", "SetCPUStartingForceSizeHuge");
	}

	OnEvent("SetCPUStartingForceSizeHuge")
	{
		Cmd("network.session.ivar127 8");
	}


	CreateControl("AnimalTitle", "STATIC")
	{
//		Position(0, 310);
		Position(45, 906);
		Size(240, 30);
		Style("TRANSPARENT");
		Font("SMALL");
		JustifyText("LEFT");
		Text("Animals:");
	}

	CreateControl("AnimalSlider", "SLIDER")
	{
		// ColorGroup("LISTBOX");
		ColorGroup("BLACKBLUE");
		// ColorGroup("MAGENTA");
//		Position(95, 310);
		Position(240, 906);
		Size(450, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER");
		Cursor("Highlight");
		UseVar("network.session.ivar27");
	}

	CreateControl("AnimalValue", "STATIC")
	{
//		Position(250, 310);
		Position(705, 900);
		Size(150, 27);
		Style("TRANSPARENT");
		Font("TINY");
		JustifyText("LEFT");
		Text("%d");
		UseVar("network.session.ivar27");
	}


	CreateControl("AnimalListWindow", "WINDOW")
	{
		ColorGroup("MAGENTA");
//		Position(5, 350);
		Position(15, 1020);
		Size(780, 90);
		Style("INERT"); 
//		Style("TRANSPARENT");
		Geometry("LEFT", "TOP");
		BorderSize(30);
		BevelSize(15);
		TabSize(420, 30);
		Title("Select animal to use:");
		TitleFont("SMALL");
		Style("RIGHTTAB", "OUTLINE");

		CreateControl("AnimalList", "LISTBOX")
		{
			ColorGroup("LISTBOX");
			Geometry("TOP", "LEFT");
			Position(0, 0);
			Size(780, 90);
			CellSize(750, 30);
			BorderSize(15);
			BevelSize(9);
			Style("VSLIDER");
//			SliderPadding(10);
			Font("TINY");
			Cursor("Highlight");
			UseVar("network.session.svar14");
			// Contents of this list filled in automatically from code [NetCommands.cpp]
		}
	}

////////////////////////////  Option Pages  ///////////////////////////////////

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


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

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

	CreateControl("OpenExtraOptions2", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("BOTTOM", "LEFT");
		Position(330, 0);
		Size(60, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Font("SMALL");
		Text("2");
		NotifyParent("Button::Press", "OpenExtraOptions2");			
	}	
	OnEvent("OpenExtraOptions2")
	{
		FadeOut("|ExtraOptions3");
		FadeIn("|ExtraOptions2");
	}
	CreateControl("OpenExtraOptions3", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("BOTTOM", "LEFT");
		Position(420, 0);
		Size(60, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "OUTLINE", "INERT");
		Cursor("Highlight");
		Font("SMALL");
		Text("3");
	}
	CreateControl("OpenExtraOptions4", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("BOTTOM", "LEFT");
		Position(510, 0);
		Size(60, 27);
		BorderSize(9);
		BevelSize(9);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Font("SMALL");
		Text("4");
		NotifyParent("Button::Press", "OpenExtraOptions4");			
	}
	OnEvent("OpenExtraOptions4")
	{
		FadeOut("|ExtraOptions3");
		FadeIn("|ExtraOptions4");
	}
}
