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

//
// Mission-specific interface. Top-level entry must be named
// "ExtraOptions"
//
CreateControl("ExtraOptions", "WINDOW")
{
	ColorGroup("MAGENTA");
	Geometry("RIGHT", "TOP");
	Position(-20, 60);
	Size(270, 400);
	BorderSize(10);
	BevelSize(5);
	TabSize(110, 10);
	Title("Game Options");
	TitleFont("SMALL");
	Style("RIGHTTAB", "OUTLINE");

	// Required control: gotta be able to get out of here.
	CreateControl("CloseExtras", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "BOTTOM");
		Position(0, 0);
		Size(140, 9);
		BorderSize(3);
		BevelSize(3);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Server options");
		NotifyParent("Button::Press", "CloseExtra");
	}

	CreateControl("PlayerLimitTitle", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 0);
		Size(95, 9);
		Font("SMALL");
		Text("Player Limit:");
		JustifyText("RIGHT");
		Style("TRANSPARENT");
	}

	CreateControl("PlayerLimitEdit", "STATIC")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(98, 0);
		Size(19, 9);
		BorderSize(3);
		BevelSize(3);
		JustifyText("LEFT", "OUTLINE");
		Font("TINY");
		Cursor("Highlight");
		UseVar("network.session.ivar2");
		//			SetIntegerRange("network.session.ivar2", 0, 8);
	}

	CreateControl("TeamsTitle", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(0, 20);
		Size(60, 9);
		Font("SMALL");
		Text("Teams:");
		JustifyText("LEFT");
		Style("TRANSPARENT");
	}

	CreateControl("TeamsOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(68, 20);
		Size(19, 9);
		BorderSize(3);
		BevelSize(3);
		Style("INERT", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar3");
		Value(0);
	}

	CreateControl("TeamsOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(98, 20);
		Size(19, 9);
		BorderSize(3);
		BevelSize(3);
		Style("INERT", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar3");
		Value(1);
	}

	CreateControl("SyncTitle", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(125, 40);
		Size(85, 9);
		Font("SMALL");
		Text("Sync Join:");
		JustifyText("RIGHT");
		Style("TRANSPARENT");
	}

	CreateControl("SyncOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(218, 40);
		Size(19, 9);
		BorderSize(3);
		BevelSize(3);
		Style("INERT", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar8");
		Value(0);
	}

	CreateControl("SyncOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(248, 40);
		Size(19, 9);
		BorderSize(3);
		BevelSize(3);
		Style("INERT", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar8");
		Value(1);
	}

	CreateControl("PausingTitle", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(125, 60);
		Size(85, 9);
		Font("SMALL");
		Text("Pause Join:");
		JustifyText("RIGHT");
		Style("TRANSPARENT");
	}

	CreateControl("PausingOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(218, 60);
		Size(19, 9);
		BorderSize(3);
		BevelSize(3);
		Style("INERT", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar10");
		Value(1);
	}

	CreateControl("PausingOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(248, 60);
		Size(19, 9);
		BorderSize(3);
		BevelSize(3);
		Style("INERT", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar10");
		Value(0);
	}

	CreateControl("ShowTeamNames", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(0, 40);
		Size(110, 9);
		BorderSize(3);
		BevelSize(3);
		Style("Rollover", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Show Team Names");
		NotifyParent("Button::Press","DoShowNames");
	}

	OnEvent("DoShowNames")
	{
		Cmd("network.session.showteamnames");
	}

	CreateControl("MWFTitle", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(45, 80);
		Size(165, 9);
		Font("SMALL");
		Text("Multiworld Frequency:");
		JustifyText("LEFT");
		Style("TRANSPARENT");
	}

	CreateControl("MWFEdit", "STATIC")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(218, 80);
		Size(49, 9);
		BorderSize(3);
		BevelSize(3);
		JustifyText("LEFT");
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("network.session.ivar20");
		SetIntegerRange("network.session.ivar20", 1, 20);
	}

	CreateControl("VoiceTitle", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(45, 100);
		Size(165, 9);
		Font("SMALL");
		Text("BZ2 Voice Chat:");
		JustifyText("RIGHT");
		Style("TRANSPARENT");
	}

	CreateControl("VoiceOff", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(218, 100);
		Size(19, 9);
		BorderSize(3);
		BevelSize(3);
		Style("INERT", "ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("Off");
		UseVar("network.session.ivar33");
		Value(0);
	}

	CreateControl("VoiceOn", "BUTTON")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(248, 100);
		Size(19, 9);
		BorderSize(3);
		BevelSize(3);
		Style("INERT", "ROLLOVER", "RADIO", "OUTLINE");
		Cursor("Highlight");
		Font("TINY");
		Text("On");
		UseVar("network.session.ivar33");
		Value(1);
	}

	CreateControl("AltTabTitle", "STATIC")
	{
		Geometry("LEFT", "TOP");
		Position(45, 120);
		Size(165, 9);
		Font("Tiny");
		Text("AltTab tolerate seconds (-1=unlimited):");
		JustifyText("RIGHT");
		Style("TRANSPARENT");
	}

	CreateControl("AltTabEdit", "EDIT")
	{
		ColorGroup("BLACKBLUE");
		Geometry("LEFT", "TOP");
		Position(218, 120);
		Size(49, 9);
		BorderSize(3);
		BevelSize(3);
		JustifyText("RIGHT");
		Font("TINY");
		Style("INERT", "ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("network.session.ivar34");
		SetIntegerRange("network.session.ivar34", -1, 999);
	}

	CreateControl("MapThumbs", "BUTTON")
	{
		ColorGroup("MAGENTA");
		Geometry("HCENTER", "BOTTOM");
		Position(0, -25);
		Size(200, 200);
		Style("ROLLOVER", "OUTLINE", "INERT");
		Cursor("Highlight");
		Image("bzshlmp_thumbsbtn.dxtbz2",0,0);
		CreateControl("VersionText", "STATIC")
		{
			Geometry("HCENTER", "BOTTOM");
			Position(0, 0);
			Size(200, 9);
			Font("SMALL");
			Text("1.3 ST MPACK VERSION: 0.1");
			JustifyText("CENTER");
			Style("TRANSPARENT");
		}
	}
	
	OnEvent("CloseExtra")
	{
		Cmd("network.session.closeextras");
	}
}

