// =============================
// BATTLEZONE ENVIRONMENT EDITOR
// =============================

//
// CREATE ENVIRONMENT EDITOR VARIABLES
//
ConfigureVarSys()
{
	CreateInteger("editor.environ.mode.value", 0);
	SetIntegerRange("editor.environ.mode.value", 0, 3);
}

//
// CREATE THE ENVIRONMENT EDITOR WINDOW
//
CreateControl("EditEnviron", "WINDOW")
{
	Pos(2, 10);
	Size(105, 240);
	BevelSize(0);
	ColorGroup("BACKGROUND");

		CreateControl("BoxTitle", "STATIC")
			{
			ColorGroup("TVBACK1");
			Geometry("LEFT", "BOTTOM");
			Pos(0, 27);
			Size(105, 23);
			BevelSize(4);
			Font("LARGE");
			JustifyText("HCENTRE");
			Text("Environ");
			}

	CreateControl("ModeTitle", "STATIC")
	{
		Pos(5, 5);
		Size(80, 10);
		Font("TINY");
		JustifyText("LEFT");
		Text("Mode");
		Style("TRANSPARENT");
	}

	CreateControl("ModePlace", "BUTTON")
	{
		Pos(8, 20);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Place");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.environ.mode.value");
		Value(0);
		NotifyParent("Button::Select", "Place");
	}

	CreateControl("ModeErase", "BUTTON")
	{
		Pos(58, 20);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Erase");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.environ.mode.value");
		Value(1);
		NotifyParent("Button::Select", "Erase");
	}

	CreateControl("ModeEyedrop", "BUTTON")
	{
		Pos(8, 40);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Eyedrop");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.environ.mode.value");
		Value(2);
		NotifyParent("Button::Select", "Eyedrop");
	}
	
	CreateControl("ModeSelect", "BUTTON")
	{
		Pos(58, 40);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Select");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.environ.mode.value");
		Value(3);
		NotifyParent("Button::Select", "Select");
	}

	CreateControl("ConfigTitle", "STATIC")
	{
		Pos(5, 60);
		Size(80, 10);
		Font("TINY");
		JustifyText("LEFT");
		Text("Config");
		Style("Transparent");
	}

	CreateControl("Config", "EDIT")
	{
		Pos(8, 75);
		Size(89, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.environ.config");
	}

	CreateControl("LabelTitle", "STATIC")
	{
		Pos(5, 95);
		Size(80, 10);
		Font("TINY");
		JustifyText("LEFT");
		Text("Label");
		Style("Transparent");
	}

	CreateControl("Label", "EDIT")
	{
		Pos(8, 110);
		Size(89, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.environ.label");
	}

	CreateControl("NameTitle", "STATIC")
	{
		Pos(5, 130);
		Size(80, 10);
		Font("TINY");
		JustifyText("LEFT");
		Text("Name");
		Style("Transparent");
	}

	CreateControl("Name", "EDIT")
	{
		Pos(8, 145);
		Size(89, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.environ.name");
	}

	CreateControl("TeamTitle", "STATIC")
	{
		Pos(5, 165);
		Size(80, 10);
		Font("TINY");
		JustifyText("LEFT");
		Text("Team");
		Style("Transparent");
	}

	CreateControl("Team", "EDIT")
	{
		Pos(8, 180);
		Size(89, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.environ.team");
	}

	CreateControl("HeightTitle", "STATIC")
	{
		Pos(5, 200);
		Size(80, 10);
		Font("TINY");
		JustifyText("LEFT");
		Text("Height");
		Style("Transparent");
	}

	CreateControl("Height", "EDIT")
	{
		Pos(8, 215);
		Size(89, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.environ.height");
	}

	OnEvent("Control::Activate")
	{
		Cmd("editor.mode.environ");
	}

	OnEvent("Place")
	{
		Cmd("editor.environ.mode.place");
	}

	OnEvent("Erase")
	{
		Cmd("editor.environ.mode.erase");
	}

	OnEvent("Eyedrop")
	{
		Cmd("editor.environ.mode.eyedrop");
	}

	OnEvent("Select")
	{
		Cmd("editor.environ.mode.select");
	}

}
