mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
..obviously only for vehicles that have pantographs at all
This commit is contained in:
@@ -821,8 +821,10 @@ debug_panel::update_section_vehicle( std::vector<text_line> &Output ) {
|
||||
|
||||
Output.emplace_back( m_buffer.data(), Global.UITextColor );
|
||||
|
||||
std::snprintf(m_buffer.data(), m_buffer.size(), STR_C("Energy consumed from pantographs: %.1f kWh"), mover.EnergyConsumed);
|
||||
Output.emplace_back( m_buffer.data(), Global.UITextColor );
|
||||
if( mover.EnginePowerSource.SourceType == TPowerSource::CurrentCollector ) {
|
||||
std::snprintf(m_buffer.data(), m_buffer.size(), STR_C("Energy consumed from pantographs: %.1f kWh"), mover.EnergyConsumed);
|
||||
Output.emplace_back( m_buffer.data(), Global.UITextColor );
|
||||
}
|
||||
|
||||
if (!std::isnan(last_time)) {
|
||||
double dt = Timer::GetTime() - last_time;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user