// ================
// BATTLEZONE SHELL
// ================

//
// End of a BZ2 Multiplayer game. Shows gameover reason, results.
//
CreateControl("ShellMultiEnd", "WINDOW")
{
	Style("TRANSPARENT", "INERT");
	Geom("PARENTWIDTH", "PARENTHEIGHT");

	OnEvent("Control::Activate")
	{
		cmd("shell.background multip_end.tga");
		cmd("shell.backgroundSound mire22_4.wav");
	}

	//
	//
	// create the "Main" button
	//
	CreateControl("Main", "BUTTON")
	{
		ColorGroup("MAGENTA");
		Position(30, 30);
		Size(143, 0);
		BorderSize(15);
		BevelSize(8);
		Style("ROLLOVER", "OUTLINE");
		Text("Main");
		Font("MEDIUM");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Main");
	}


	//
	// create the "Games" button
	//
	CreateControl("Games", "BUTTON")
	{
		ColorGroup("MAGENTA");
		Position(788, 30);
		Size(143, 0);
		BorderSize(15);
		BevelSize(8);
		Style("ROLLOVER", "OUTLINE", "BLINK");
		Text("To Gamelist");
		Font("MEDIUM");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Next");
	}

	OnEvent("Next")
	{
		cmd("shell.stopSound mire22_4.wav");
		FadeOut("|ShellMultiEnd");
		cmd("network.session.endnext");
		//		FadeIn("|ShellMulti");
	}

	OnEvent("Main")
	{
		Cmd("network.session.leave");
		Cmd("network.setoff");
		cmd("shell.stopSound mire22_4.wav");
		FadeOut("|ShellMultiEnd");
		// FadeIn/Outs done from NetCommands::DoIfaceQuitToMainMenu() now
	}

	CreateControl("ShellMultiEnd", "WINDOW")
	{
		ColorGroup("MAGENTA");
		Geometry("LEFT", "TOP");
		Position(30, 90);
		Size(900, 375);
		BorderSize(15);
		BevelSize(8);
		TabSize(225, 15);
		Title("Game Results");
		TitleFont("MEDIUM");
		Style("LEFTTAB", "OUTLINE");

		CreateControl("GameoverReason", "STATIC")
		{
			Geometry("LEFT", "TOP");
			JustifyText("CENTER");
			Position(0, 8);
			Size(870, 23);
			Font("MEDIUM");
			Text("Game Over");
			Style("TRANSPARENT");
		}

		//
		// create the scroll bar
		//
		CreateControl("SelectionSlider", "LISTSLIDER")
		{
			Orientation("VERTICAL");
			Geometry("LEFT", "TOP");
			Position(870, 60);
			Size(15, 315);
			Style("BUTTONS", "ROLLOVER");
			Cursor("Highlight");
			// Do NOT use a var for this slider!
			// It's controlled automagically by association
		}

		CreateControl("ScoreColumn1", "LISTBOX")
		{
			ColorGroup("LISTBOX");	
			Geometry("LEFT", "TOP");
			Position(75, 60);
			Size(600, 315);
			CellSize(585, 23);
			Font("Small");
			UseVar("network.scoredisplay");
			Style("NOSELECTION", "TRANSPARENT");
			ItemConfig()
			{
				Style("TRANSPARENT");
			}
			UseSlider("<SelectionSlider");
		}

		CreateControl("ScoreColumn2", "LISTBOX")
		{
			ColorGroup("LISTBOX");	
			Geometry("LEFT", "TOP");
			Position(675, 60);
			Size(105, 315);
			CellSize(90, 23);
			Font("Small");
			UseVar("network.scoredisplay");
			Style("NOSELECTION", "TRANSPARENT");
			ItemConfig()
  			{
  				Style("TRANSPARENT");
  			}
			UseSlider("<SelectionSlider");
		}

	}
}





