// ======================
// BATTLEZONE SCRAP GAUGE
// ======================

ConfigureInterface()
{
	DefineColorGroup("SPEEDHOLDER")
	{
		// unselected, unhighlit
		Foreground(0, 0, 0, 255, 255);
		Background(0, 0, 127, 255, 160);
		Gradient(0, 0, 127, 255, 255);

		// selected, unhighlit
		Foreground(1, 0, 0, 255, 255);
		Background(1, 0, 127, 255, 160);
		Gradient(1, 0, 127, 255, 255);

		// unselected, highlit
		Foreground(2, 0, 0, 255, 255);
		Background(2, 0, 127, 255, 160);
		Gradient(2, 0, 127, 255, 255);

		// selected, highlit
		Foreground(3, 0, 0, 255, 255);
		Background(3, 0, 127, 255, 160);
		Gradient(3, 0, 127, 255, 255);
	}

	DefineColorGroup("SPEEDSEGMENT")
	{
		// SEGMENT_TYPE_RECYCLERVEHICLE
		Foreground(0, 255, 255, 255, 255);
		Background(0, 0, 255, 0, 255);
		Gradient(0, 0, 255, 0, 255);

		// SEGMENT_TYPE_RECYCLER
		Foreground(1, 255, 255, 255, 255);
		Background(1, 0, 255, 0, 255);
		Gradient(1, 0, 255, 0, 255);

		// SEGMENT_TYPE_EXTRACTOR1
		Foreground(2, 255, 255, 255, 255);
		Background(2, 255, 255, 0, 255);
		Gradient(2, 255, 255, 0, 255);

		// SEGMENT_TYPE_EXTRACTOR2
		Foreground(3, 255, 255, 255, 255);
		Background(3, 255, 0, 0, 255);
		Gradient(3, 255, 0, 0, 255);
	}
}

CreateControl("Speedometer", "STATIC")
{
	ColorGroup("SPEEDHOLDER");
	Geometry("RIGHT", "BOTTOM");
	Pos(15, -45);   //was (5, -115)
	Size(53, 0);
	Image("colorize_x1_5.tga", 0, 80, 33, 83);

	CreateControl("Top", "STATIC")
	{
		ColorGroup("SPEEDHOLDER");
		Pos(0, -16);
		Size(53, 0);
		Image("colorize_x1_5.tga", 0, 65, 33, 81);
	}

	CreateControl("SpeedGauge", "GAUGE")
	{
		ColorGroup("SPEEDHOLDER");
		Geometry("VCENTER");
		Orientation("VERTICAL");
		Style("TRANSPARENT");
		Pos(15, -3);
		Size(23, 0);
		UseVar("options.instant.int31");
	}

	CreateControl("SpeedSegment1", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "BOTTOM", "HINTERNAL", "VINTERNAL");
		Align("<Gauge");
		Pos(-10, 0);
		Size(44, 0);
	}

	CreateControl("SpeedSegment2", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment1");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment3", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment2");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment4", "STATIC")
	{
		ColorGroup("SpeedSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment3");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment5", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment4");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment6", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment5");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment7", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment6");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment8", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment7");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment9", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment8");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment10", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment9");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment11", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment10");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment12", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment11");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment13", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment12");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment14", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment13");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment15", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment14");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("SpeedSegment16", "STATIC")
	{
		ColorGroup("SPEEDSEGMENT");
		Geometry("LEFT", "TOP", "HINTERNAL");
		Align("<SpeedSegment15");
		Pos(0, -1);
		Size(44, 0);
	}

	CreateControl("Speed", "STATIC")
	{
		ColorGroup("WHITE");
		Geometry("BOTTOM");
		Pos(0, 0);
		Size(53, 15);
		Style("TRANSPARENT");
		Font("SMALL");
		JustifyText("CENTER");
		UseVar("options.instant.int31");
	}

	CreateControl("SpeedBottom", "STATIC")
	{
		ColorGroup("SPEEDHOLDER");
		Geometry("BOTTOM");
		Pos(0, 17);
		Size(53, 17);
		Image("colorize_x1_5.tga", 0, 81, 33, 98);
	}
}
