Index: code/hud/hud.cpp
===================================================================
--- code/hud/hud.cpp	(revision 5859)
+++ code/hud/hud.cpp	(working copy)
@@ -1300,12 +1300,24 @@
 		//Display the gauges
 		for(i = 0; i < Num_custom_gauges; i++)
 		{
-			if(current_hud->custom_gauge_colors[i].red != 0 || current_hud->custom_gauge_colors[i].green != 0 || current_hud->custom_gauge_colors[i].blue != 0)
+			color* gauge_color;
+
+			// Inherit color if color parent is specified.
+			if (current_hud->custom_gauge_color_parents[i] >=0 && current_hud->custom_gauge_color_parents[i] < NUM_HUD_GAUGES)
+ 			{
+				gauge_color = &HUD_config.clr[current_hud->custom_gauge_color_parents[i]];
+			}
+			else
 			{
+				gauge_color = &current_hud->custom_gauge_colors[i];
+			}
+
+			if(gauge_color->red != 0 || gauge_color->green != 0 || gauge_color->blue != 0)
+			{
 				//No custom alpha gauge color...
-				gr_init_alphacolor(&current_hud->custom_gauge_colors[i], current_hud->custom_gauge_colors[i].red, current_hud->custom_gauge_colors[i].green, current_hud->custom_gauge_colors[i].blue, (HUD_color_alpha+1)*16);
+				gr_init_alphacolor(gauge_color, gauge_color->red, gauge_color->green, gauge_color->blue, (HUD_color_alpha+1)*16);
 
-				gr_set_color_fast(&current_hud->custom_gauge_colors[i]);
+				gr_set_color_fast(gauge_color);
 			}
 			if(strlen(current_hud->custom_gauge_text[i]))
 			{
@@ -1314,7 +1326,14 @@
 			}
 			if(image_ids[i].first_frame != -1)
 			{
-				GR_AABITMAP(image_ids[i].first_frame + current_hud->custom_gauge_frames[i], current_hud->custom_gauge_coords[i][0], current_hud->custom_gauge_coords[i][1]);
+				if (current_hud->custom_gauge_moveflags[i])
+				{
+					GR_AABITMAP(image_ids[i].first_frame + current_hud->custom_gauge_frames[i], current_hud->custom_gauge_coords[i][0] + HUD_nose_x, current_hud->custom_gauge_coords[i][1] + HUD_nose_y);
+				}
+				else
+				{
+					GR_AABITMAP(image_ids[i].first_frame + current_hud->custom_gauge_frames[i], current_hud->custom_gauge_coords[i][0], current_hud->custom_gauge_coords[i][1]);
+				}
 			}
 
 			//So we're back to normal
Index: code/hud/hudconfig.cpp
===================================================================
--- code/hud/hudconfig.cpp	(revision 5859)
+++ code/hud/hudconfig.cpp	(working copy)
@@ -47,6 +47,48 @@
 };
 
 HUD_CONFIG_TYPE HUD_config;	// Player HUD configuration
+ 
+char Hud_Gauge_Names[NUM_HUD_GAUGES][NAME_LENGTH] = {
+	"lead indicator",
+	"target orientation",
+	"closest attacking hostile",
+	"current target direction",
+	"mission time",
+	"reticle",
+	"throttle",
+	"radar",
+	"target monitor",
+	"center of reticle",
+	"extra target info",
+	"target shield",
+	"player shield",
+	"power management",
+	"auto-target icon",
+	"auto-speed-match icon",
+	"weapons display",
+	"monitoring view",
+	"directives view",
+	"threat gauge",
+	"afterburner energy",
+	"weapons energy",
+	"weapon linking",
+	"target hull/shield icon",
+	"offscreen indicator",
+	"comm video",
+	"damage display",
+	"message output",
+	"locked missile direction",
+	"countermeasures",
+	"objective notify",
+	"wingmen status",
+	"offscreen range",
+	"kills gauge",
+	"attacking target count",
+	"warning flash",
+	"comm menu",
+	"support gauge",
+	"lag gauge"
+};
 
 // specify the max distance that the radar should detect objects
 // See RR_ #defines in HUDconfig.h.
Index: code/hud/hudparse.cpp
===================================================================
--- code/hud/hudparse.cpp	(revision 5859)
+++ code/hud/hudparse.cpp	(working copy)
@@ -26,6 +26,7 @@
 hud_info default_hud;
 hud_info ship_huds[MAX_SHIP_CLASSES];
 extern int ships_inited; //Need this
+extern char Hud_Gauge_Names[NUM_HUD_GAUGES][NAME_LENGTH];
 
 float Hud_unit_multiplier = 1.0f;	//Backslash
 
@@ -43,26 +44,26 @@
 #define HUD_VAR(a) offsetof(hud_info, a)
 
 gauge_info gauges[MAX_HUD_GAUGE_TYPES] = {
-	{ NULL,			HUD_VAR(Player_shield_coords),	"$Player Shield:",			396, 379, 634, 670,	0, 0, 0, 0, 0, -1, -1 },
-	{ NULL,			HUD_VAR(Target_shield_coords),	"$Target Shield:",			142, 379, 292, 670,	0, 0, 0, 0, 0, -1, -1 },
-	{ NULL,			HUD_VAR(Shield_mini_coords),	"$Shield Mini:",			305, 291, 497, 470, 0, HUD_VAR(Shield_mini_fname), 0, 0, 0, -1, -1 },
-	{ NULL,			HUD_VAR(Aburn_coords),			"$Afterburner Energy:",		171, 265, 274, 424, HUD_VAR(Aburn_size), HUD_VAR(Aburn_fname), 0, 0, 0, -1, -1 },
-	{ NULL,			HUD_VAR(Wenergy_coords),		"$Weapons Energy:",			416, 265, 666, 424, HUD_VAR(Wenergy_size), HUD_VAR(Wenergy_fname), 0, 0, 0, -1, -1 },
-	{ NULL,			HUD_VAR(Wenergy_text_coords),	"$Weapons Energy Text:",	439, 318, 708, 509, 0, 0, 0, 0, 0, -1, -1 },
-	{ NULL,			HUD_VAR(Escort_coords),			"$Escort List:",			486, 206, 865, 330, 0, HUD_VAR(Escort_filename[0]), 0, HUD_VAR(Escort_htext), 0, -1, -1 },
+	{ NULL,			HUD_VAR(Player_shield_coords),	"$Player Shield:",			396, 379, 634, 670,	0, 0, 0, 0, 0, 0, 0, -1, -1 },
+	{ NULL,			HUD_VAR(Target_shield_coords),	"$Target Shield:",			142, 379, 292, 670,	0, 0, 0, 0, 0, 0, 0, -1, -1 },
+	{ NULL,			HUD_VAR(Shield_mini_coords),	"$Shield Mini:",			305, 291, 497, 470, 0, HUD_VAR(Shield_mini_fname), 0, 0, 0, 0, 0, -1, -1 },
+	{ NULL,			HUD_VAR(Aburn_coords),			"$Afterburner Energy:",		171, 265, 274, 424, HUD_VAR(Aburn_size), HUD_VAR(Aburn_fname), 0, 0, 0, 0, HUD_VAR(Aburn_move_flag), -1, -1 },
+	{ NULL,			HUD_VAR(Wenergy_coords),		"$Weapons Energy:",			416, 265, 666, 424, HUD_VAR(Wenergy_size), HUD_VAR(Wenergy_fname), 0, 0, 0, 0, HUD_VAR(Wenergy_move_flag), -1, -1 },
+	{ NULL,			HUD_VAR(Wenergy_text_coords),	"$Weapons Energy Text:",	439, 318, 708, 509, 0, 0, 0, 0, 0, 0, 0, -1, -1 },
+	{ NULL,			HUD_VAR(Escort_coords),			"$Escort List:",			486, 206, 865, 330, 0, HUD_VAR(Escort_filename[0]), 0, HUD_VAR(Escort_htext), 0, 0, 0, -1, -1 },
 
 	//Mini-gauges
-	{ &gauges[2],	HUD_VAR(Hud_mini_3digit),		"$Text Base:",				310, 298, 502, 477,	0, 0, 0, 0, 0, -1, -1 },
-	{ &gauges[2],	HUD_VAR(Hud_mini_1digit),		"$Text 1 digit:",			316, 298, 511, 477,	0, 0, 0, 0, 0, -1, -1 },
-//	{ &gauges[2],	HUD_VAR(Hud_mini_2digit),		"$Text 2 digit:",			213, 298, 346, 477,	0, 0, 0, 0, 0, -1, -1 },
-	{ &gauges[2],	HUD_VAR(Hud_mini_2digit),		"$Text 2 digit:",			313, 298, 506, 477,	0, 0, 0, 0, 0, -1, -1 },
-	{ &gauges[5],	HUD_VAR(Escort_htext_coords),	"$Header Text:",			489, 208, 869, 331,			0, 0, 0, 0, 0, -1, -1 },
-	{ &gauges[5],	HUD_VAR(Escort_list),			"$List:",					0, 12, 0, 13,		0, 0, 0, 0, 0, HG_NOADD, -1 },
-	{ &gauges[5],	HUD_VAR(Escort_entry),			"$Ship:",					0, 11, 0, 11,		0, HUD_VAR(Escort_filename[1]), 0, 0, 0, HG_NOADD, -1 },
-	{ &gauges[5],	HUD_VAR(Escort_entry_last),		"$Last Ship:",				0, 11, 0, 11,		0, HUD_VAR(Escort_filename[2]), 0, 0, 0, HG_NOADD, -1 },
-	{ &gauges[5],	HUD_VAR(Escort_name),			"$Ship Name:",				3, 0, 4, 0,			0, 0, 0, 0, 0, HG_NOADD, -1 },
-	{ &gauges[5],	HUD_VAR(Escort_integrity),		"$Ship Hull:",				128, 0, 116, 0,		0, 0, 0, 0, 0, HG_NOADD, -1 },
-	{ &gauges[5],	HUD_VAR(Escort_status),			"$Ship Status:",			-12, 0, -11, 0,		0, 0, 0, 0, 0, HG_NOADD, -1 }
+	{ &gauges[2],	HUD_VAR(Hud_mini_3digit),		"$Text Base:",				310, 298, 502, 477,	0, 0, 0, 0, 0, 0, 0, -1, -1 },
+	{ &gauges[2],	HUD_VAR(Hud_mini_1digit),		"$Text 1 digit:",			316, 298, 511, 477,	0, 0, 0, 0, 0, 0, 0, -1, -1 },
+//	{ &gauges[2],	HUD_VAR(Hud_mini_2digit),		"$Text 2 digit:",			213, 298, 346, 477,	0, 0, 0, 0, 0, 0, 0, -1, -1 },
+	{ &gauges[2],	HUD_VAR(Hud_mini_2digit),		"$Text 2 digit:",			313, 298, 506, 477,	0, 0, 0, 0, 0, 0, 0, -1, -1 },
+	{ &gauges[5],	HUD_VAR(Escort_htext_coords),	"$Header Text:",			489, 208, 869, 331,			0, 0, 0, 0, 0, 0, 0, -1, -1 },
+	{ &gauges[5],	HUD_VAR(Escort_list),			"$List:",					0, 12, 0, 13,		0, 0, 0, 0, 0, 0, 0, HG_NOADD, -1 },
+	{ &gauges[5],	HUD_VAR(Escort_entry),			"$Ship:",					0, 11, 0, 11,		0, HUD_VAR(Escort_filename[1]), 0, 0, 0, 0, 0, HG_NOADD, -1 },
+	{ &gauges[5],	HUD_VAR(Escort_entry_last),		"$Last Ship:",				0, 11, 0, 11,		0, HUD_VAR(Escort_filename[2]), 0, 0, 0, 0, 0, HG_NOADD, -1 },
+	{ &gauges[5],	HUD_VAR(Escort_name),			"$Ship Name:",				3, 0, 4, 0,			0, 0, 0, 0, 0, 0, 0, HG_NOADD, -1 },
+	{ &gauges[5],	HUD_VAR(Escort_integrity),		"$Ship Hull:",				128, 0, 116, 0,		0, 0, 0, 0, 0, 0, 0, HG_NOADD, -1 },
+	{ &gauges[5],	HUD_VAR(Escort_status),			"$Ship Status:",			-12, 0, -11, 0,		0, 0, 0, 0, 0, 0, 0, HG_NOADD, -1 }
 };
 
 //Number of gauges
@@ -103,6 +104,10 @@
 		/**************************************************/
 	}
 
+	// Pan View Move Flag defaults
+	hud->Aburn_move_flag = true;
+	hud->Wenergy_move_flag = true;
+
 	//Neither
 	strcpy_s(hud->Shield_mini_fname, "targhit1");
 	strcpy_s(hud->Escort_filename[0], "escort1");
@@ -262,6 +267,35 @@
 			stuff_ubyte(&junk_byte);
 		}
 	}
+	if(optional_string("+Inherit Color from:"))
+	{
+		*HUD_INT(dest_hud, cg->color_parent_dest) = -1;
+		stuff_string(buffer, F_NAME, NAME_LENGTH);
+		
+		if(cg->color_parent_dest)
+		{
+			for (int idx = 0; idx < NUM_HUD_GAUGES; idx++)
+			{
+				if (stricmp(buffer, Hud_Gauge_Names[idx]) == 0)
+				{
+					*HUD_INT(dest_hud, cg->color_parent_dest) = idx;
+					break;
+				}
+			}
+		}
+	}
+	if(optional_string("+Move in Pan View:"))
+	{
+		if(cg->moveflag_dest)
+		{
+			stuff_boolean(HUD_BOOL(dest_hud, cg->moveflag_dest));
+		}
+		else
+		{
+			bool junk_bool;
+			stuff_boolean(&junk_bool);
+		}
+	}
 	return 1;
 }
 
@@ -426,6 +460,8 @@
 		cg->frame_dest = HUD_VAR(custom_gauge_frames[0]) + (Num_custom_gauges * sizeof(int));
 		cg->text_dest = HUD_VAR(custom_gauge_text[0]) + (Num_custom_gauges * (NAME_LENGTH * sizeof(char)));
 		cg->color_dest = HUD_VAR(custom_gauge_colors[0]) + (Num_custom_gauges * sizeof(color));
+		cg->color_parent_dest = HUD_VAR(custom_gauge_color_parents[0]) + (Num_custom_gauges * sizeof(int));
+		cg->moveflag_dest = HUD_VAR(custom_gauge_moveflags[0]) + (Num_custom_gauges * sizeof(bool));
 
 		required_string("$Name:");
 		//Gotta make this a token
Index: code/hud/hudparse.h
===================================================================
--- code/hud/hudparse.h	(revision 5859)
+++ code/hud/hudparse.h	(working copy)
@@ -33,6 +33,8 @@
 	int Wenergy_size[2];
 	char Aburn_fname[MAX_FILENAME_LEN];
 	char Wenergy_fname[MAX_FILENAME_LEN];
+	bool Aburn_move_flag;
+	bool Wenergy_move_flag;
 	//Hudescort
 	int Escort_coords[2];
 
@@ -58,6 +60,8 @@
 	int custom_gauge_frames[MAX_CUSTOM_HUD_GAUGES];
 	char custom_gauge_text[MAX_CUSTOM_HUD_GAUGES][NAME_LENGTH];
 	color custom_gauge_colors[MAX_CUSTOM_HUD_GAUGES];
+	int custom_gauge_color_parents[MAX_CUSTOM_HUD_GAUGES];
+	bool custom_gauge_moveflags[MAX_CUSTOM_HUD_GAUGES];
 
 //	int gauge_text_sexp_vars[MAX_HUD_GAUGE_TYPES];
 //	int gauge_frame_sexp_vars[MAX_HUD_GAUGE_TYPES];
@@ -98,6 +102,8 @@
 		memset( custom_gauge_frames, 0, sizeof( custom_gauge_frames ) );
 		memset( custom_gauge_text, 0, sizeof( custom_gauge_text ) );
 		memset( custom_gauge_colors, 0, sizeof( custom_gauge_colors ) );
+		memset( custom_gauge_color_parents, 0, sizeof( custom_gauge_color_parents ) );
+		memset( custom_gauge_moveflags, 0, sizeof( custom_gauge_moveflags ) );
 	}
 } hud_info;
 
@@ -115,6 +121,8 @@
 	size_t frame_dest;	//Storage spot for frame info
 	size_t text_dest;	//Storage spot for text value
 	size_t color_dest;	//Storage spot for color value
+	size_t color_parent_dest;	//Storage spot for color value
+	size_t moveflag_dest;	//Storage spot for pan view move boolean
 	int placement_flags;
 	int show_flags;	//Show outside ship?
 	//int (*update_gauge)(gauge_info* cg);	//Function to update the gauge
@@ -127,6 +135,7 @@
 #define HUD_INT(a, b) ((int*)((char*)a + b))
 #define HUD_CHAR(a, b) ((char *)((char*)a + b))
 #define HUD_COLOR(a, b) ((color *)((char*)a + b))
+#define HUD_BOOL(a, b) ((bool *)((char*)a + b))
 
 //Variables
 extern int Num_custom_gauges;
Index: code/hud/hudtarget.cpp
===================================================================
--- code/hud/hudtarget.cpp	(revision 5859)
+++ code/hud/hudtarget.cpp	(working copy)
@@ -4821,6 +4821,7 @@
 {
 	float percent_left;
 	int	clip_h,w,h;	
+	int nose_offset_x = 0, nose_offset_y = 0;
 
 	if ( Aburn_bar_gauge.first_frame == -1 ){
 		return;
@@ -4842,13 +4843,19 @@
 	clip_h = fl2i( (1.0f - percent_left) * current_hud->Aburn_size[0] + 0.5f );
 
 	bm_get_info(Aburn_bar_gauge.first_frame,&w,&h);
+
+	if (current_hud->Aburn_move_flag)
+	{
+		nose_offset_x = HUD_nose_x;
+		nose_offset_y = HUD_nose_y;
+	}
 	
 	if ( clip_h > 0) {
-		GR_AABITMAP_EX(Aburn_bar_gauge.first_frame, current_hud->Aburn_coords[0] + HUD_nose_x, current_hud->Aburn_coords[1] + HUD_nose_y,w,clip_h,0,0);		
+		GR_AABITMAP_EX(Aburn_bar_gauge.first_frame, current_hud->Aburn_coords[0] + nose_offset_x, current_hud->Aburn_coords[1] + nose_offset_y,w,clip_h,0,0);
 	}
 
 	if ( clip_h <= current_hud->Aburn_size[0] ) {		
-		GR_AABITMAP_EX(Aburn_bar_gauge.first_frame+1, current_hud->Aburn_coords[0] + HUD_nose_x, current_hud->Aburn_coords[1]+clip_h + HUD_nose_y,w,h-clip_h,0,clip_h);
+		GR_AABITMAP_EX(Aburn_bar_gauge.first_frame+1, current_hud->Aburn_coords[0] + nose_offset_x, current_hud->Aburn_coords[1]+clip_h + nose_offset_y,w,h-clip_h,0,clip_h);
 	} 	
 }
 
@@ -4857,6 +4864,7 @@
 {
 	int x;
 	bool use_new_gauge = false;
+	int nose_offset_x = 0, nose_offset_y = 0;
 
 	// Goober5000 - only check for the new gauge in case of command line + a ballistic-capable ship
 	if (Cmdline_ballistic_gauge && Ship_info[Player_ship->ship_info_index].flags & SIF_BALLISTIC_PRIMARIES)
@@ -4870,6 +4878,12 @@
 			}
 		}
 	}
+ 
+	if (current_hud->Aburn_move_flag)
+	{
+		nose_offset_x = HUD_nose_x;
+		nose_offset_y = HUD_nose_y;
+	}
 
 	if(use_new_gauge)
 	{
@@ -4877,8 +4891,8 @@
 		int y;
 		int max_w = 100;
 		float remaining;
-		currentx = current_hud->Wenergy_coords[0] + 10;
-		currenty = current_hud->Wenergy_coords[1];
+		currentx = current_hud->Wenergy_coords[0] + 10 + nose_offset_x;
+		currenty = current_hud->Wenergy_coords[1] + nose_offset_y;
 		if(gr_screen.max_w_unscaled == 640) {
 			max_w = 60;
 		}
@@ -4980,7 +4994,7 @@
 			sprintf(buf,XSTR( "%d%%", 326), fl2i(percent_left*100+0.5f));
 			hud_num_make_mono(buf);
 		//	gr_string(Weapon_energy_text_coords[gr_screen.res][0], Weapon_energy_text_coords[gr_screen.res][1], buf);
-			gr_string(current_hud->Wenergy_text_coords[0] + HUD_nose_x, current_hud->Wenergy_text_coords[1] + HUD_nose_y, buf);
+			gr_string(current_hud->Wenergy_text_coords[0] + nose_offset_x, current_hud->Wenergy_text_coords[1] + nose_offset_y, buf);
 		}
 
 		hud_set_gauge_color(HUD_WEAPONS_ENERGY);
@@ -5002,11 +5016,11 @@
 		bm_get_info(Wenergy_bar_gauge.first_frame+2,&w,&h);
 		
 		if ( clip_h > 0 ) {
-			GR_AABITMAP_EX(Wenergy_bar_gauge.first_frame+2, current_hud->Wenergy_coords[0] + HUD_nose_x, current_hud->Wenergy_coords[1] + HUD_nose_y, w,clip_h,0,0);		
+			GR_AABITMAP_EX(Wenergy_bar_gauge.first_frame+2, current_hud->Wenergy_coords[0] + nose_offset_x, current_hud->Wenergy_coords[1] + nose_offset_y, w,clip_h,0,0);
 		}
 
 		if ( clip_h <= current_hud->Wenergy_size[0] ) {
-			GR_AABITMAP_EX(Wenergy_bar_gauge.first_frame+3, current_hud->Wenergy_coords[0] + HUD_nose_x, current_hud->Wenergy_coords[1] + clip_h + HUD_nose_y, w,h-clip_h,0,clip_h);		
+			GR_AABITMAP_EX(Wenergy_bar_gauge.first_frame+3, current_hud->Wenergy_coords[0] + nose_offset_x, current_hud->Wenergy_coords[1] + clip_h + nose_offset_y, w,h-clip_h,0,clip_h);		
 		}
 
 		// hud_set_default_color();
