ConfigureVarSys()
{
	
	CreateInteger("images.page", 4);
	SetIntegerRange("images.page", 0, 4);

	
	CreateString("images.models", "Edflogo.xsi");
}

CreateControl("INFO", "STATIC")
{

	Geom("HCENTRE", "VCENTRE");


	Size(900, 600);


	BorderSize(15);
	BevelSize(8);


	TabSize(300, 15);

	Style("OUTLINE", "INERT");

	Title("Earth Defense Forces");

	TitleFont("MEDIUM");

	CreateControl("Page1Butt", "BUTTON")
	{
		Pos(15, 15);
		Size(83, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		Text("Core Diary");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("images.page");
		Value(0);
		NotifyParent("Button::Select", "Page1");
	}

	CreateControl("Page2Butt", "BUTTON")
	{
		Pos(116, 15);
		Size(83, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		Text("Ark II Log");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(1);
		UseVar("images.page");

		NotifyParent("Button::Select", "Page2");
	}

	CreateControl("Page3Butt", "BUTTON")
	{
		Pos(216, 15);
		Size(113, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		Text("Biometal Riots");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		Value(2);
		UseVar("images.page");

		NotifyParent("Button::Select", "Page3");
	}

	CreateControl("ReturnButt", "BUTTON")
	{
		Pos(417, 15);
		Size(150, 15);
		BorderSize(8);
		BevelSize(8);
		Font("TINY");
		Text("Exit Infoterminal");
		Style("ROLLOVER", "RADIO","OUTLINE");
		Value(3);
		UseVar("images.page");
		NotifyParent("Button::Select", "Return");
	}

			CreateControl("Image1", "Static")
	{
		//ColorGroup: What colorgroup to use. Base colorgroups are defined in bzgame_init.cfg.
		ColorGroup("WHITE");

		Geom("Top", "Left");
		Size(540, 525);
		Pos(0, 60);
		Image("wlogo.tga",  0, 0, 360, 350);
	}

	CreateControl("XSIView", "VIEWER")
	{
		Geom("TOP", "LEFT");
		Position(8, 60);
		Size(525, 300);
		BorderSize(0);
		BevelSize(0);
		ColorGroup("LISTBOX");

		//UseVar: What variable to use to get xsi name. This is the same as the listbox variable, 
		//so when a user selects a different item in the listbox, it will display that item that the
		//user has selected.
		UseVar("images.models");


		SetAmbientColor(1.0, 1.0, 1.0);
		SetDiffuseColor(1.0, 1.0, 1.0);
		SetDiffuseDir(2.0, -5.0, 1.0);
		SetModelDistance(500.0);
		SetModelInclination(0.0);
		SetModelRotation(60.0);
	}

			CreateControl("List", "LISTBOX")
	{
		Style("INERT", "NOSELECTION", "VSLIDER");
		Geometry("LEFT", "TOP");
		Position(555, 60);
		Size(300, 525);
		CellSize(300, 15);
		SliderPadding(10);
		Font("SMALL");
		ItemConfig()
		{
			Style("TRANSPARENT");
		}
		FillFromFile("timeline.txt");

	}

	//Deactivates other page static controls and activates Page1 on the
	//Page1 event (which is sent from the button Page1Butt when it is selected) 
	OnEvent("Page1")
	{
		Deactivate("|Start");
		Deactivate("|Page2");
		Deactivate("|Page3");
		Cmd("images.models core.xsi");	
		Activate("|Page1");
	}

	OnEvent("Page2")
	{
		Deactivate("|Start");
		Deactivate("|Page1");
		Deactivate("|Page3");
		Cmd("images.models arktwo.xsi");	
		Activate("|Page2");
	}

	OnEvent("Page3")
	{
		Deactivate("|Start");
		Deactivate("|Page1");
		Deactivate("|Page2");
		Cmd("images.models ivcarr00_new.xsi");	
		Activate("|Page3");
	}

	
	OnEvent("Return")
	{

		Deactivate("|Page1");
		Deactivate("|Page2");
		Deactivate("|Page3");
		Cmd("images.models Edflogo.xsi");	
		Activate("|Start");

	}

	
	OnEvent("Control::Activate")
	{
		Cmd("images.page 4");
		Activate("|Start");
	}

		OnEvent("Control::Deactivate")
	{
		
		Deactivate("|Start");
		Deactivate("|Page1");
		Deactivate("|Page2");
		Deactivate("|Page3");
	}
}

CreateControl("Start", "STATIC")
{
	Geom("HCENTRE", "VCENTRE");
	Pos(0, 30);
	Size(900, 390);
	Style("TRANSPARENT");
	BevelSize(5);

}


CreateControl("Page1", "STATIC")
{
	Geom("HCENTRE", "VCENTRE");
	Pos(0, 30);
	Size(900, 390);
	Style("TRANSPARENT");
	BevelSize(5);


	CreateControl("List", "LISTBOX")
	{
		Style("INERT", "NOSELECTION", "VSLIDER");
		Geometry("LEFT", "TOP");
		Position(0, 225);
		Size(540, 225);
		CellSize(510, 15);
		ColorGroup("LISTBOX");
		SliderPadding(10);
		Font("SMALL");
		ItemConfig()
		{
			Style("TRANSPARENT");
		}
		FillFromFile("Core.txt");

	}


	

}

CreateControl("Page2", "STATIC")
{
	Geom("HCENTRE", "VCENTRE");
	Pos(0, 30);
	Size(900, 390);
	Style("TRANSPARENT");
	BevelSize(5);



		CreateControl("List", "LISTBOX")
	{
		Style("INERT", "NOSELECTION", "VSLIDER");
		Geometry("LEFT", "TOP");
		Position(0, 225);
		Size(540, 225);
		ColorGroup("LISTBOX");
		CellSize(510, 15);
		SliderPadding(10);
		Font("SMALL");
		ItemConfig()
		{
			Style("TRANSPARENT");
		}
		FillFromFile("Ark2.txt");
	}



}

CreateControl("Page3", "STATIC")
{
	Geom("HCENTRE", "VCENTRE");
	Pos(0, 30);
	Size(900, 540);
	Style("TRANSPARENT");
	BevelSize(5);


		CreateControl("List", "LISTBOX")
	{
		Style("INERT", "NOSELECTION", "VSLIDER");
		Geometry("LEFT", "TOP");
		Position(0, 300);
		Size(540, 225);
		CellSize(510, 15);
		ColorGroup("LISTBOX");
		SliderPadding(10);
		Font("SMALL");
		ItemConfig()
		{
			Style("TRANSPARENT");
		}
		FillFromFile("mercnews.txt");

	}
}
