// ========================
// BATTLEZONE HEIGHT EDITOR
// ========================
//
// ============================================
// Oiled, polished and pinstriped by RocketmanX
// ============================================
///////////////////////////////////
// CREATE HEIGHT EDITOR VARIABLES
//////////////////////////////////
//
ConfigureVarSys()
{
	CreateInteger("editor.height.shape.value", 0);
	SetIntegerRange("editor.height.shape.value", 0, 3);
	CreateInteger("editor.height.mode.value", 4);
	SetIntegerRange("editor.height.mode.value", 0, 4);
}

//
// CREATE THE HEIGHT EDITOR WINDOW
//
CreateControl("EditHeight", "WINDOW")
{
	Pos(2, 10);
	//Size(105, 325);
	Size(105, 355);
	BevelSize(2);
	ColorGroup("BACKGROUND");

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

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

	CreateControl("Width", "EDIT")
	{
		ColorGroup("TVBACK1");
		Pos(70,8);
		Size(27, 11);
		BorderSize(1);
		BevelSize(3);
		Font("BRUSH");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.height.size.width");
	}

	CreateControl("Width", "SLIDER")
	{
		ColorGroup("TVBUTTON1");
		Pos(8, 25);
		Size(89, 7);
		BorderSize(2);
		BevelSize(3);
		Cursor("Highlight");
		Font("TINY");
		UseVar("editor.height.size.width");
		Style("ROLLOVER", "OUTLINE");
	}

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

	CreateControl("Depth", "EDIT")
	{
		ColorGroup("TVBACK1");
		Pos(70, 43);
		Size(27, 11);
		BorderSize(1);
		BevelSize(3);
		Font("BRUSH");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.height.size.depth");
	}

	CreateControl("Depth", "SLIDER")
	{
		ColorGroup("TVBUTTON1");
		Pos(8, 60);
		Size(89, 7);
		BorderSize(2);
		BevelSize(3);
		Cursor("Highlight");
		Font("TINY");
		UseVar("editor.height.size.depth");
		Style("ROLLOVER", "OUTLINE");
	}

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

	CreateControl("ShapeSquare", "BUTTON")
	{
//		ColorGroup("TVBUTTON1");
		Pos(8, 90);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Square");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.shape.value");
		Value(0);
		NotifyParent("Button::Select", "Square");
	}

	CreateControl("ShapeCircle", "BUTTON")
	{
//		ColorGroup("TVBUTTON1");
		Pos(58, 90);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Circle");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.shape.value");
		Value(1);
		NotifyParent("Button::Select", "Circle");
	}

	CreateControl("ShapeCone", "BUTTON")
	{
//		ColorGroup("TVBUTTON1");
		Pos(8, 110);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Cone");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.shape.value");
		Value(2);
		NotifyParent("Button::Select", "Cone");
	}

	CreateControl("ShapeBell", "BUTTON")
	{
//		ColorGroup("TVBUTTON1");
		Pos(58, 110);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Bell");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.shape.value");
		Value(3);
		NotifyParent("Button::Select", "Bell");
	}

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

	CreateControl("ModePaint", "BUTTON")
	{
//		ColorGroup("TVBUTTON1");
		Pos(8, 145);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Paint");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.mode.value");
		Value(0);
		NotifyParent("Button::Select", "Paint");
	}

	CreateControl("ModeSpray", "BUTTON")
	{
//		ColorGroup("TVBUTTON1");
		Pos(58, 145);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Spray");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.mode.value");
		Value(1);
		NotifyParent("Button::Select", "Spray");
	}

	CreateControl("ModeRaise", "BUTTON")
	{
//		ColorGroup("TVBUTTON1");
		Pos(8, 165);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Raise");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.mode.value");
		Value(2);
		NotifyParent("Button::Select", "Raise");
	}

	CreateControl("ModeBlend", "BUTTON")
	{
//		ColorGroup("TVBUTTON1");
		Pos(58, 165);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Blend");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.mode.value");
		Value(3);
		NotifyParent("Button::Select", "Blend");
	}

	CreateControl("ModeEyedrop", "BUTTON")
	{
//		ColorGroup("TVBUTTON1");
		Pos(8, 185);
		Size(39, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Eyedrop");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.mode.value");
		Value(4);
		NotifyParent("Button::Select", "Eyedrop");
	}
	
	CreateControl("PressureTitle", "STATIC")
	{
		Pos(5, 209);
		Size(80, 10);
		Font("TINY");
		JustifyText("LEFT");
		Text("Pressure");
		Style("Transparent");
	}

	CreateControl("Pressure", "EDIT")
	{
		Pos(63, 210);
		Size(35, 9);
		BorderSize(2);
		BevelSize(3);
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.height.pressure");
	}

	CreateControl("PressureSlider", "SLIDER")
	{
		ColorGroup("TVBUTTON1");
		Pos(8, 230);
		Size(89, 6);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		Range (0,100);
		UseVar("editor.height.pressure");
	}

	CreateControl("ForegroundTitle", "STATIC")
	{
		Pos(5, 249);
		Size(80, 10);
		Font("TINY");
		JustifyText("LEFT");
		Text("Foreground");
		Style("Transparent");
	}

	CreateControl("Foreground", "EDIT")
	{
		Pos(63, 250);
		Size(35, 9);
		BorderSize(2);
		BevelSize(3);
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.height.foreground");
	}

	CreateControl("Foreground", "SLIDER")
	{
		ColorGroup("TVBUTTON1");
		Pos(7, 270);
		Size(90, 6);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Range (0,4200);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.height.foreground");
	}

	CreateControl("BackgroundTitle", "STATIC")
	{
		Pos(5, 289);
		Size(80, 10);
		Font("TINY");
		JustifyText("LEFT");
		Text("Background");
		Style("Transparent");
	}

	CreateControl("Background", "EDIT")
	{
		Pos(63, 290);
		Size(35, 9);
		BorderSize(2);
		BevelSize(3);
		Font("TINY");
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.height.background");
	}
	CreateControl("Background", "SLIDER")
	{
		ColorGroup("TVBUTTON1");
		Pos(7, 310);
		Size(90, 6);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Range (0,4200);
		Style("ROLLOVER", "OUTLINE");
		Cursor("Highlight");
		UseVar("editor.height.background");
	}

	CreateControl("Fill", "BUTTON")
	{
		Pos(8, 335);
		Size(89, 9);
		BorderSize(3);
		BevelSize(3);
		Font("TINY");
		Text("Fill with Foreground");
		Cursor("Highlight");
		Style("ROLLOVER", "RADIO", "OUTLINE");
		UseVar("editor.height.mode.value");
		Value(5);
		NotifyParent("Button::Select", "Fill");
	}

	OnEvent("Fill")
	{
		Cmd("editor.height.fill");
	}

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

	OnEvent("Square")
	{
		Cmd("editor.height.shape.square");
	}

	OnEvent("Circle")
	{
		Cmd("editor.height.shape.circle");
	}

	OnEvent("Cone")
	{
		Cmd("editor.height.shape.cone");
	}

	OnEvent("Bell")
	{
		Cmd("editor.height.shape.bell");
	}

	OnEvent("Paint")
	{
		Cmd("editor.height.mode.paint");
	}

	OnEvent("Spray")
	{
		Cmd("editor.height.mode.spray");
	}

	OnEvent("Raise")
	{
		Cmd("editor.height.mode.raise");
	}

	OnEvent("Blend")
	{
		Cmd("editor.height.mode.blend");
	}

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