Skip to content

Commit f4a3add

Browse files
committed
Implement suggestion and fix small Bug
1 parent a21c420 commit f4a3add

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Race Element.HUD.Common/Overlays/Driving/HybridInfo/HybridInfoOverlay.cs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,12 @@ public sealed override void BeforeStop()
100100
public sealed override void Render(Graphics g)
101101
{
102102
_cachedBackground?.Draw(g, 0, 0, _config.Bar.Width, _config.Bar.Height);
103-
float energyLevel = GetEnergyLevel();
103+
float energyLevel = SimDataProvider.LocalCar.Electronics.PushToPassLevel;
104104

105105
DrawEnergyBar(g, energyLevel);
106106
DrawEnergyText(g, energyLevel);
107107
}
108-
109-
private float GetEnergyLevel()
110-
{
111-
return SimDataProvider.LocalCar.Electronics.PushToPassLevel;
112-
}
108+
113109

114110
private void DrawEnergyBar(Graphics g, float energyLevel)
115111
{
@@ -140,7 +136,7 @@ private void DrawEnergyBar(Graphics g, float energyLevel)
140136
drawWidth.ClipMin(1);
141137

142138
g.SetClip(new Rectangle(0, 0, (int)drawWidth, _config.Bar.Height));
143-
_cachedEnergyStage1?.Draw(g, 0, 0, width, _config.Bar.Height);
139+
_cachedEnergyStage3?.Draw(g, 0, 0, width, _config.Bar.Height);
144140
g.ResetClip();
145141
}
146142

0 commit comments

Comments
 (0)