..obviously only for vehicles that have pantographs at all

This commit is contained in:
milek7
2021-01-16 19:52:30 +01:00
parent fdafcbc9be
commit 5d130c7fcf
2 changed files with 8 additions and 4 deletions

View File

@@ -277,8 +277,10 @@ void ui::vehicleparams_panel::render_contents()
ImGui::TextUnformatted(buffer.data());
std::snprintf(buffer.data(), buffer.size(), STR_C("Energy consumed from pantographs: %.1f kWh"), mover.EnergyConsumed);
ImGui::TextUnformatted(buffer.data());
if( mover.EnginePowerSource.SourceType == TPowerSource::CurrentCollector ) {
std::snprintf(buffer.data(), buffer.size(), STR_C("Energy consumed from pantographs: %.1f kWh"), mover.EnergyConsumed);
ImGui::TextUnformatted(buffer.data());
}
draw_mini(mover);