// ================
// BATTLEZONE SHELL  fe rev c 05 version
// ================

Exec("bzshell_cpbeta.cfg");
Exec("bzshell_cpbeta2.cfg");

//
// CREATE SHELL LOGIN PAGE
//
CreateControl("ShellLogin", "WINDOW")
{
	// inherit root window's dimensions
	Geometry("PARENTWIDTH", "PARENTHEIGHT");

	// set window style
	Style("TRANSPARENT", "INERT");

	
	//
	// create the login edit box
	//
	CreateControl("LoginEdit", "EDIT")
	{
		Geometry("HCENTRE", "TOP");
		Position(0, 130);
		Size(200, 20);
		Style("ROLLOVER", "OUTLINE");
		Projector(1);
		BorderSize(10);
		BevelSize(5);
		TabSize(120, 10);
		Title("Login Name");
		TitleFont("MEDIUM");
		Font("LARGE");
		Cursor("Highlight");
		UseVar("shell.login.name");
		MaxLength(21);	// 20 characters + 1 for the end
	}

	//
	// create the login list box
	//
	CreateControl("LoginList", "WINDOW")
	{
		Geometry("HCENTRE", "TOP");
		Position(0, 190);
		Size(200, 100);
		BorderSize(10);
		BevelSize(5);
		Style("OUTLINE");
		Projector(3);
		TabSize(120, 10);
		Title("Duty Roster");
		TitleFont("MEDIUM");
		
		CreateControl("List", "LISTBOX")
		{
			ColorGroup("LISTBOX");

			Geometry("HCENTRE", "TOP");
			Position(0, 0);
			Size(200, 100);
			CellSize(200, 10);
			BorderSize(5);
			BevelSize(3);
			Font("SMALL");
			UseVar("shell.login.slot");
			Cursor("Highlight");
		}
	}

	//
	// create the "retire" button
	//
	CreateControl("Retire", "BUTTON")
	{
		Geometry("HCENTRE", "TOP");
		Position(0, 320);
		Size(200, 15);
		BorderSize(10);
		BevelSize(5);
		Style("ROLLOVER", "OUTLINE");
		Projector(5);
		Font("MEDIUM");
		JustifyText("CENTER");
		Text("Retire Pilot");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Retire");
	}

	//
	// create the "enter" button
	//
	CreateControl("Enter", "BUTTON")
	{
		ColorGroup("MAGENTA");

		Geometry("RIGHT", "TOP");
		Position(-36, 26);
		Size(55, 0);
		BorderSize(9);
		BevelSize(4);
		Style("ROLLOVER", "OUTLINE");
		Text("Enter");
		Font("MEDIUM");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Enter");
	}

	//
	// create FE version info
	//	


		CreateControl("PatchVersTitleB", "BUTTON")
	{
		ColorGroup("MAGENTA");
		Geometry("CENTER", "TOP");
		Position(166, 26);
		Size(56, 0);
		BorderSize(9);
		BevelSize(4);
		Style("OUTLINE");
		Text("Rev. B");
		Font("SMALL");
		Cursor("Highlight");
		NotifyParent("Button::Press","DoSetVersion");

	}
	
		OnEvent("DoSetVersion")
		{
		FadeOut("|ShellLogin");
		FadeIn("|BetaCredits");
		}

		CreateControl("PatchVersTitleC", "BUTTON")
	{
		ColorGroup("MAGENTA");
		Geometry("CENTER", "TOP");
		Position(294, 26);
		Size(56, 0);
		BorderSize(9);
		BevelSize(4);
		Style("OUTLINE");
		Text("Rev. C");
		Font("SMALL");
		Cursor("Highlight");
		NotifyParent("Button::Press","DoSetVersion2");

	}

		OnEvent("DoSetVersion2")
		{
		FadeOut("|ShellLogin");
		FadeIn("|BetaCredits2");
		}

	//
	// create the "quit" button
	//
	CreateControl("Quit", "BUTTON")
	{
		ColorGroup("MAGENTA");

		Geometry("LEFT", "TOP");
		Position(40, 26);
		Size(55, 0);
		BorderSize(9);
		BevelSize(4);
		Style("ROLLOVER", "OUTLINE");
		Text("Quit");
		Font("MEDIUM");
		Cursor("Highlight");
		NotifyParent("Button::Press", "Quit");
	}

	//
	// handle the "retire" event
	//
	OnEvent("Retire")
	{
		Cmd("shell.login.retire");
	}

	//
	// handle the "enter" event
	//
	OnEvent("Enter")
	{
		Cmd("shell.login.enter");
		//FadeOut();
		//FadeIn("|ShellMain");
	}

	//
	// handle the "quit" event
	//
	OnEvent("Quit")
	{
		Cmd("sys.runcode quit");
	}

	OnEvent("Control::Activate")
	{
		cmd("shell.background login.tga");
		cmd("shell.backgroundSound mire22_1.wav");
		cmd("shell.showversion");

//		Exec("bzshell_fe_version.cfg");
//		FadeOut("|HandiPW");

	}
	
	OnEvent("Control::Deactivate")
	{
		cmd("shell.stopSound mire22_1.wav");
	}

	CreateControl("Version", "STATIC")
	{
		Geometry("CENTER", "BOTTOM");
		Position(225, 0);
		Size(190, 15);
		Font("MEDIUM");
		Text("VERSION: Fixme!");
		JustifyText("center");
		Style("OUTLINE"); // "TRANSPARENT", 
	}

}

