@@ -296,15 +296,16 @@ void parse_hud_gauges_tbl(const char *filename)
296296
297297 for (int i = 0 ; i < NUM_HUD_COLOR_PRESETS ; i++) {
298298 SCP_string colorPresetString = " $Color Preset " + std::to_string (i + 1 ) + " :" ;
299- if (optional_string (colorPresetString.c_str ())) {
299+ SCP_string colourPresetString = " $Colour Preset " + std::to_string (i + 1 ) + " :" ;
300+ if (optional_string_either (colorPresetString.c_str (), colourPresetString.c_str ()) >= 0 ) {
300301 hc_col preset;
301302 required_string (" +Name:" );
302303 stuff_string (preset.name , F_NAME );
303304
304305 required_string (" +XSTR ID:" );
305306 stuff_int (&preset.xstr );
306307
307- required_string (" +Color:" );
308+ required_string_either (" +Color: " , " +Colour :" );
308309 int rgb[3 ] = {255 , 255 , 255 };
309310 stuff_int_list (rgb, 3 );
310311
@@ -334,7 +335,7 @@ void parse_hud_gauges_tbl(const char *filename)
334335 stuff_boolean (&Hud_retail);
335336 }
336337
337- if (optional_string (" $Color:" ) ) {
338+ if (optional_string_either (" $Color:" , " $Colour: " ) >= 0 ) {
338339 stuff_int_list (colors, 3 );
339340
340341 check_color (colors);
@@ -387,7 +388,7 @@ void parse_hud_gauges_tbl(const char *filename)
387388 }
388389 }
389390
390- if (optional_string (" $Wireframe Color Override:" ) ) {
391+ if (optional_string_either (" $Wireframe Color Override:" , " $Wireframe Colour Override: " ) >= 0 ) {
391392 int rgb[3 ];
392393 stuff_int_list (rgb, 3 , RAW_INTEGER_TYPE );
393394 gr_init_color (&Targetbox_color, rgb[0 ], rgb[1 ], rgb[2 ]);
@@ -462,7 +463,7 @@ void parse_hud_gauges_tbl(const char *filename)
462463 stuff_boolean (&Ship_info[ship_idx].hud_retail );
463464 }
464465
465- if (optional_string (" $Color:" ) ) {
466+ if (optional_string_either (" $Color:" , " $Colour: " ) >= 0 ) {
466467 stuff_int_list (colors, 3 );
467468
468469 check_color (colors);
@@ -503,7 +504,7 @@ void parse_hud_gauges_tbl(const char *filename)
503504 Ship_info[shiparray[i]].hud_retail = retail_config;
504505 }
505506
506- if (optional_string (" $Color:" ) ) {
507+ if (optional_string_either (" $Color:" , " $Colour: " ) >= 0 ) {
507508 stuff_int_list (colors, 3 );
508509
509510 check_color (colors);
@@ -590,7 +591,7 @@ void parse_hud_gauges_tbl(const char *filename)
590591 }
591592 }
592593
593- if (optional_string (" $Color:" ) ) {
594+ if (optional_string_either (" $Color:" , " $Colour: " ) >= 0 ) {
594595 stuff_int_list (colors, 3 );
595596
596597 check_color (colors);
@@ -1520,7 +1521,7 @@ std::unique_ptr<T> gauge_load_common(gauge_settings* settings, T* preAllocated =
15201521 colors[2 ] = settings->use_clr ->blue ;
15211522
15221523 lock_color = true ;
1523- } else if ( optional_string (" Color:" ) ) {
1524+ } else if ( optional_string_either (" Color:" , " Colour: " ) >= 0 ) {
15241525 stuff_int_list (colors, 3 );
15251526
15261527 check_color (colors);
@@ -1696,7 +1697,7 @@ void load_gauge_custom(gauge_settings* settings)
16961697 colors[2 ] = settings->use_clr ->blue ;
16971698
16981699 lock_color = true ;
1699- } else if ( optional_string (" Color:" ) ) {
1700+ } else if ( optional_string_either (" Color:" , " Colour: " ) >= 0 ) {
17001701 stuff_int_list (colors, 3 );
17011702
17021703 check_color (colors);
@@ -3547,7 +3548,7 @@ void load_gauge_target_monitor(gauge_settings* settings)
35473548 if (optional_string (" Wireframe:" )) {
35483549 stuff_int (&wireframe);
35493550 }
3550- if (optional_string (" Wireframe Color:" ) ) {
3551+ if (optional_string_either (" Wireframe Color:" , " Wireframe Colour: " ) >= 0 ) {
35513552 int rgb[3 ];
35523553 stuff_int_list (rgb, 3 , RAW_INTEGER_TYPE );
35533554 gr_init_color (&wirecolor, rgb[0 ], rgb[1 ], rgb[2 ]);
@@ -4156,11 +4157,11 @@ void load_gauge_auto_target(gauge_settings* settings)
41564157 stuff_int_list (target_text_offset, 2 );
41574158 }
41584159
4159- if ( optional_string (" On Text Color:" ) ) {
4160+ if ( optional_string_either (" On Text Color:" , " On Text Colour: " ) >= 0 ) {
41604161 stuff_int_list (on_color, 4 );
41614162 }
41624163
4163- if ( optional_string (" Off Text Color:" ) ) {
4164+ if ( optional_string_either (" Off Text Color:" , " Off Text Colour: " ) >= 0 ) {
41644165 stuff_int_list (off_color, 4 );
41654166 }
41664167
@@ -4215,11 +4216,11 @@ void load_gauge_auto_speed(gauge_settings* settings)
42154216 stuff_int_list (speed_text_offset, 2 );
42164217 }
42174218
4218- if ( optional_string (" On Text Color:" ) ) {
4219+ if ( optional_string_either (" On Text Color:" , " On Text Colour: " ) >= 0 ) {
42194220 stuff_int_list (on_color, 4 );
42204221 }
42214222
4222- if ( optional_string (" Off Text Color:" ) ) {
4223+ if ( optional_string_either (" Off Text Color:" , " Off Text Colour: " ) >= 0 ) {
42234224 stuff_int_list (off_color, 4 );
42244225 }
42254226
@@ -4376,7 +4377,7 @@ void load_gauge_wingman_status(gauge_settings* settings)
43764377 }
43774378
43784379 bool use_expanded_colors = false ;
4379- if (optional_string (" Use Expanded Colors:" ) ) {
4380+ if (optional_string_either (" Use Expanded Colors:" , " Use Expanded Colours: " ) >= 0 ) {
43804381 stuff_boolean (&use_expanded_colors);
43814382 }
43824383
0 commit comments