diff --git a/profiling.cc b/profiling.cc index e4dd40f..64103c4 100644 --- a/profiling.cc +++ b/profiling.cc @@ -123,7 +123,7 @@ void T_Profiler::makeUI( ) ImGuiSetCond_Once ); ImGui::Begin( "Profiler" ); - ImGui::BeginChild( "left" , ImVec2( 150 , 0 ) , true ); + ImGui::BeginChild( "left" , ImVec2( 180 , 0 ) , true ); float angle( 0 ); for ( auto i = 0u ; i < n ; i ++ ) { if ( displayed_.size( ) == i ) { @@ -134,8 +134,12 @@ void T_Profiler::makeUI( ) ImGui::ColorConvertHSVtoRGB( angle / 360. , .5 , 1 , color.x , color.y , color.z ); ImGui::PushStyleColor( ImGuiCol_Text , color ); - ImGui::Checkbox( sections_[ i ].c_str( ) , - (bool*) &displayed_[ i ] ); + + std::ostringstream str; + str << sections_[ i ] << " (" + << int( round( secDurations_[ i ] ) ) + << "ms)"; + ImGui::Checkbox( str.str( ).c_str( ) , (bool*) &displayed_[ i ] ); ImGui::PopStyleColor( ); } ImGui::EndChild( );