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

CreateControl("ExtraOptions5", "WINDOW")
{
	ColorGroup("MAGENTA");
	Geometry("RIGHT", "TOP");
	Position(-30, 90);
	Size(405, 600);
	BorderSize(15);
	BevelSize(8);
	TabSize(300, 15);
	Title("G66 3.1 AIP Options");
	TitleFont("SMALL");
	Style("RIGHTTAB", "OUTLINE", "INERT");

	CreateControl("AIPListWindow", "WINDOW")
	{
		ColorGroup("MAGENTA");
		Position(8, 38);
		Size(390, 147);
//		Style("INERT"); //  "TRANSPARENT"
		Geometry("LEFT", "TOP");
		BorderSize(15);
		BevelSize(8);
		TabSize(210, 23);
		Title("AI Plans");
		TitleFont("SMALL");
		Style("RIGHTTAB", "OUTLINE", "INERT");

		CreateControl("AIPList", "LISTBOX")
		{
			ColorGroup("LISTBOX");
			Geometry("TOP", "LEFT");
			Position(0, 0);
			Size(390, 150);
			CellSize(375, 15);
			BorderSize(8);
			BevelSize(5);
			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(45, 2);  // (153, 150)
		Size(68, 14);
		BorderSize(5);
		BevelSize(5);
		Font("TINY");
		Text("AIP Info");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		NotifyParent("Button::Press", "AIPDescButton");
	}

	OnEvent("AIPDescButton")
	{
		Exec("AIPDesc_x1_5.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, 240);
		Size(203, 14);
		Font("SMALL");
		Text("Tech Path:");
		JustifyText("right");
		Style("TRANSPARENT");
	}

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

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

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

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

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

//		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");
//		}

      	CreateControl("PagesLabel", "STATIC")
      	{
      		Geometry("LEFT", "BOTTOM");
      		Position(0, 0);
      		Size(45, 14);
      		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(53, 0);
      		Size(45, 14);
      		BorderSize(5);
      		BevelSize(5);
      		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(113, 0);
      		Size(15, 14);
      		BorderSize(5);
      		BevelSize(5);
      		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(143, 0);
      		Size(15, 14);
      		BorderSize(5);
      		BevelSize(5);
      		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(173, 0);
      		Size(15, 14);
      		BorderSize(5);
      		BevelSize(5);
      		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(203, 0);
      		Size(15, 14);
      		BorderSize(5);
      		BevelSize(5);
      		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(233, 0);
			Size(15, 14);
			BorderSize(5);
			BevelSize(5);
			Style("INERT", "OUTLINE");
			Cursor("Highlight");
			Font("SMALL");
			Text("5");
			UseVar("network.session.ivar101");
			Value(32);
		}

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

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