Skip to content

Commit bad1129

Browse files
committed
Put low/high RPM behind setting
1 parent 2c9ef59 commit bad1129

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

Source/Settings.as

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,9 @@ vec4 Setting_Gearbox_Gear4Color = vec4(1, 1, 1, 1);
265265
[Setting category="Gearbox" name="Gear 5 color" color if="Setting_Gearbox_UseGearColors"]
266266
vec4 Setting_Gearbox_Gear5Color = vec4(1, 1, 1, 1);
267267

268+
[Setting category="Gearbox" name="Show low/high RPM colors on gear lights" if="Setting_Gearbox_TachometerStyle Lights"]
269+
bool Setting_Gearbox_Lights_ShowLowHighRPM = true;
270+
268271
[Setting category="Gearbox" name="Gear light color (if not using gear colors)" color if="Setting_Gearbox_TachometerStyle Lights"]
269272
vec4 Setting_Gearbox_Lights_Color = vec4(0.568f, 1, 0.961f, 1);
270273

Source/Things/Gearbox.as

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,12 @@ class DashboardGearbox : DashboardThing
235235
color = GearColor(gear);
236236
}
237237

238-
if (rpm <= Setting_Gearbox_Downshift && gear >= 2) {
239-
color = Setting_Gearbox_LowRPMColor;
240-
} else if (rpm >= Setting_Gearbox_Upshift && gear <= MAX_GEAR - 1) {
241-
color = Setting_Gearbox_HighRPMColor;
238+
if (Setting_Gearbox_Lights_ShowLowHighRPM) {
239+
if (rpm <= Setting_Gearbox_Downshift && gear >= 2) {
240+
color = Setting_Gearbox_LowRPMColor;
241+
} else if (rpm >= Setting_Gearbox_Upshift && gear <= MAX_GEAR - 1) {
242+
color = Setting_Gearbox_HighRPMColor;
243+
}
242244
}
243245

244246
float lightPadding = 8.0f;

0 commit comments

Comments
 (0)