Skip to content

Commit 5eea353

Browse files
authored
Fix Select All HUD Color Slider (scp-fs2open#7202)
scp-fs2open#6670 added support for custom gauges and also cleaned up the color setting of hud gauges when using 'Select All'. It seems two copy paste bug slipped through the cracks (ie the order of colors was copied from red to blue/green, when really the order should have been updated). This PR restores the proper order and fixes the bug.
1 parent 319e573 commit 5eea353

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

code/hud/hudconfig.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,7 +1873,7 @@ void hud_config_green_slider()
18731873
for(const auto& gauge_pair : HC_gauge_map){
18741874
const SCP_string& gauge_id = gauge_pair.first;
18751875
if (!gauge_id.empty()) {
1876-
gr_init_alphacolor(&HUD_config.gauge_colors[gauge_id], pos, HUD_config.gauge_colors[gauge_id].green, HUD_config.gauge_colors[gauge_id].blue, HUD_config.gauge_colors[gauge_id].alpha);
1876+
gr_init_alphacolor(&HUD_config.gauge_colors[gauge_id], HUD_config.gauge_colors[gauge_id].red, pos, HUD_config.gauge_colors[gauge_id].blue, HUD_config.gauge_colors[gauge_id].alpha);
18771877
}
18781878
}
18791879
}
@@ -1897,7 +1897,7 @@ void hud_config_blue_slider()
18971897
for(const auto& gauge_pair : HC_gauge_map){
18981898
const SCP_string& gauge_id = gauge_pair.first;
18991899
if (!gauge_id.empty()) {
1900-
gr_init_alphacolor(&HUD_config.gauge_colors[gauge_id], pos, HUD_config.gauge_colors[gauge_id].green, HUD_config.gauge_colors[gauge_id].blue, HUD_config.gauge_colors[gauge_id].alpha);
1900+
gr_init_alphacolor(&HUD_config.gauge_colors[gauge_id], HUD_config.gauge_colors[gauge_id].red, HUD_config.gauge_colors[gauge_id].green, pos, HUD_config.gauge_colors[gauge_id].alpha);
19011901
}
19021902
}
19031903
}

0 commit comments

Comments
 (0)