// ==================================================================================================================
// Battlezone II G66 3.1 MPI Options Shell File -- Page 4
// ==================================================================================================================

CreateControl("ExtraOptions5", "WINDOW")
{
	ColorGroup("MAGENTA");
	Geometry("RIGHT", "TOP");
	Position(-40, 120);
	Size(540, 800);
	BorderSize(20);
	BevelSize(10);
	TabSize(400, 20);
	Title("G66 3.1 AIP Options ");
	TitleFont("SMALL");
	Style("RIGHTTAB", "OUTLINE");

	CreateControl("AIPListWindow", "WINDOW")
	{
		ColorGroup("MAGENTA");
		Position(10, 50);
		Size(520, 196);
		Style("INERT"); //  "TRANSPARENT"
		Geometry("LEFT", "TOP");
		BorderSize(20);
		BevelSize(10);
		TabSize(280, 30);
		Title("AIP set (Enemy AI)");
		TitleFont("SMALL");
		Style("RIGHTTAB", "OUTLINE");

		CreateControl("AIPList", "LISTBOX")
		{
			ColorGroup("LISTBOX");
			Geometry("TOP", "LEFT");
			Position(0, 0);
			Size(520, 200);
			CellSize(500, 20);
			BorderSize(10);
			BevelSize(6);
			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(60, 2);  // (153, 150)
		Size(90, 18);
		BorderSize(6);
		BevelSize(6);
		Font("TINY");
		Text("AIP Info");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		NotifyParent("Button::Press", "AIPDescButton");
	}

	OnEvent("AIPDescButton")
	{
		Exec("AIPDesc_x2_0.cfg");
		FadeIn("|AIPDescPage");
	}
	
	// G66 CPU Strategy Options
//	CreateControl("G66TechPath", "STATIC")
//	{
		// Geometry("LEFT", "TOP");
		// Position(60, 140);
		// Size(155, 9);
		// Font("SMALL");
		// Text("CPU Strategy       ");
		// JustifyText("right");
		// Style("OUTLINE");
	// }

	// G66 Tech Path (ivar114)
	 CreateControl("G66TechStg1", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 320);
		Size(270, 18);
		Font("SMALL");
		Text("Tech Path:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

	CreateControl("G66TechStage10", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(290, 320);
		Size(26, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("0");
		UseVar("network.session.ivar114");
		Value(0);
	 	NotifyParent("Button::Select", "TechStg10");
	}

	CreateControl("G66TechStage11", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(340, 320);
		Size(26, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("1");
		UseVar("network.session.ivar114");
		Value(1);
	 	NotifyParent("Button::Select", "TechStg11");
	}

	CreateControl("G66TechStage12", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(390, 320);
		Size(26, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("2");
		UseVar("network.session.ivar114");
		Value(2);
//		 	NotifyParent("Button::Select", "TechStg12");
	}

	CreateControl("G66TechStage13", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(440, 320);
		Size(26, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("3");
		UseVar("network.session.ivar114");
		Value(3);
		 	NotifyParent("Button::Select", "TechStg13");
	}

	CreateControl("G66TechStage14", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(490, 320);
		Size(26, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("4");
		UseVar("network.session.ivar114");
		Value(4);
	 	NotifyParent("Button::Select", "TechStg14");
	}

//		CreateControl("G66TechStgX", "STATIC")
//		{
//			ColorGroup("BLACKBLUE");
//			Geometry("LEFT", "TOP");
//			Position(250, 160);
//			Size(45, 9);
//			BorderSize(3);
//			BevelSize(3);
//			JustifyText("LEFT"); //Right if the Custom button is enabled
//			Font("TINY");
//			Style("TRANSPARENT");
//			Cursor("Highlight");
//			UseVar("network.session.svar33");
//		}


	OnEvent("TechStg10")
	{
		Cmd("network.session.ivar114 0");
		Cmd("network.session.svar33 Any");
	}

	OnEvent("TechStg11")
	{
		Cmd("network.session.ivar114 1");
		Cmd("network.session.svar33 '1'");
	}

	OnEvent("TechStg12")
	{
		Cmd("network.session.ivar114 2");
		Cmd("network.session.svar33 '2'");
	}

	OnEvent("TechStg13")
	{
		Cmd("network.session.ivar114 3");
		Cmd("network.session.svar33 '3'");
	}

	OnEvent("TechStg14")
	{
		Cmd("network.session.ivar114 4");
		Cmd("network.session.svar33 '4'");
	}

	CreateControl("PagesLabel", "STATIC")
	{
		Geometry("LEFT", "BOTTOM");
		Position(0, 0);
		Size(60, 18);
		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(70, 0);
		Size(60, 18);
		BorderSize(6);
		BevelSize(6);
		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(150, 0);
		Size(20, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Font("SMALL");
		Text("1");
		NotifyParent("Button::Press", "OpenExtraOptions1");
	}

	OnEvent("OpenExtraOptions1")
	{
		FadeOut("|ExtraOptions5");
		FadeIn("|ExtraOptions");
		Cmd("network.session.ivar101 2"); 
	}

	CreateControl("OpenExtraOptions2", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("BOTTOM", "LEFT");
		Position(190, 0);
		Size(20, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Font("SMALL");
		Text("2");
		NotifyParent("Button::Press", "OpenExtraOptions2");			
	}

	OnEvent("OpenExtraOptions2")
	{
		FadeOut("|ExtraOptions5");
		FadeIn("|ExtraOptions2");
		Cmd("network.session.ivar101 4"); 
	}

	CreateControl("OpenExtraOptions3", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("BOTTOM", "LEFT");
		Position(230, 0);
		Size(20, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Font("SMALL");
		Text("3");
		NotifyParent("Button::Press", "OpenExtraOptions3");			
	}

	OnEvent("OpenExtraOptions3")
	{
		FadeOut("|ExtraOptions5");
		FadeIn("|ExtraOptions3");
		Cmd("network.session.ivar101 8"); 
	}

	CreateControl("OpenExtraOptions4", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("BOTTOM", "LEFT");
		Position(270, 0);
		Size(20, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Font("SMALL");
		Text("4");
		NotifyParent("Button::Press", "OpenExtraOptions4");			
	}

	OnEvent("OpenExtraOptions4")
	{
		FadeOut("|ExtraOptions5");
		FadeIn("|ExtraOptions4");
		Cmd("network.session.ivar101 16"); 
	}

	CreateControl("OpenExtraOptions5", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("BOTTOM", "LEFT");
		Position(310, 0);
		Size(20, 18);
		BorderSize(6);
		BevelSize(6);
		Style("INERT", "OUTLINE");
		Cursor("Highlight");
		Font("SMALL");
		Text("5");
		UseVar("network.session.ivar101");
		Value(32);
	}

	CreateControl("OpenExtraOptions6", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("BOTTOM", "LEFT");
		Position(350, 0);
		Size(20, 18);
		BorderSize(6);
		BevelSize(6);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Font("SMALL");
		Text("6");
		NotifyParent("Button::Press", "OpenExtraOptions6");			
	}

	OnEvent("OpenExtraOptions6")
	{
		FadeOut("|ExtraOptions5");
		FadeIn("|ExtraOptions6");
		Cmd("network.session.ivar101 64"); 
	}
}
