16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 12:29:18 +02:00

maintenance: minor code cleanup

This commit is contained in:
tmj-fstate
2018-12-19 17:19:01 +01:00
parent 14c1e89209
commit 0ff7d90d9a
3 changed files with 249 additions and 285 deletions

View File

@@ -526,37 +526,7 @@ debug_panel::update_section_vehicle( std::vector<text_line> &Output ) {
vehicle.GetPosition().z );
Output.emplace_back( m_buffer.data(), Global.UITextColor );
/*
textline = " TC:" + to_string( mover.TotalCurrent, 0 );
*/
/*
if( mover.ManualBrakePos > 0 ) {
textline += "; manual brake on";
}
*/
/*
// McZapkie: warto wiedziec w jakim stanie sa przelaczniki
switch(
mover.ActiveDir *
( mover.Imin == mover.IminLo ?
1 :
2 ) ) {
case 2: { textline += " >> "; break; }
case 1: { textline += " -> "; break; }
case 0: { textline += " -- "; break; }
case -1: { textline += " <- "; break; }
case -2: { textline += " << "; break; }
}
// McZapkie: komenda i jej parametry
if( mover.CommandIn.Command != ( "" ) ) {
textline =
"C:" + mover.CommandIn.Command
+ " V1=" + to_string( mover.CommandIn.Value1, 0 )
+ " V2=" + to_string( mover.CommandIn.Value2, 0 );
}
*/
}
std::string
@@ -902,7 +872,10 @@ debug_panel::render_section( std::string const &Header, std::vector<text_line> c
if( false == ImGui::CollapsingHeader( Header.c_str() ) ) { return false; }
for( auto const &line : Lines ) {
ImGui::TextColored( ImVec4( line.color.r, line.color.g, line.color.b, line.color.a ), line.data.c_str() );
ImGui::PushStyleColor( ImGuiCol_Text, { line.color.r, line.color.g, line.color.b, line.color.a } );
ImGui::TextUnformatted( line.data.c_str() );
ImGui::PopStyleColor();
// ImGui::TextColored( ImVec4( line.color.r, line.color.g, line.color.b, line.color.a ), line.data.c_str() );
}
return true;
}