diff --git a/ui-profiling.cc b/ui-profiling.cc index 5c4b67c..a937bcc 100644 --- a/ui-profiling.cc +++ b/ui-profiling.cc @@ -148,7 +148,7 @@ void T_Profiler::makeUI( ) ImGui::SetNextWindowPos( ImVec2( 0 , dspSize.y * .66f ) , ImGuiSetCond_Appearing ); ImGui::Begin( "Profiler" , &uiEnabled_ , ImGuiWindowFlags_NoCollapse ); - ImGui::BeginChild( "left" , ImVec2( 180 , 0 ) , true ); + ImGui::BeginChild( "left" , ImVec2( 240 , 0 ) , true ); float angle( 0 ); displayed_.resize( n , true ); for ( auto i = 0u ; i < n ; i ++ ) { @@ -159,14 +159,13 @@ void T_Profiler::makeUI( ) ImGui::PushStyleColor( ImGuiCol_Text , color ); ebcl::T_StringBuilder sb; - char tms[ 12 ]; - snprintf( tms , 12 , "%.1f" , secDurations_[ i ] ); - sb << sections_[ i ] << " (" << tms << "ms)" << '\0'; + sb << sections_[ i ] << '\0'; ImGui::Checkbox( sb.data( ) , &displayed_[ i ] ); ImGui::PopStyleColor( ); if ( ImGui::IsItemHovered( ) ) { ImGui::BeginTooltip( ); + char tms[ 12 ]; snprintf( tms , 12 , "%.3f" , secDurations_[ i ] ); sb.clear( ) << sections_[ i ] << '\0'; ImGui::PushStyleColor( ImGuiCol_Text , color ); @@ -182,6 +181,11 @@ void T_Profiler::makeUI( ) ImGui::EndTooltip( ); } + + ImGui::PushStyleColor( ImGuiCol_Text , color ); + ImGui::SameLine( 180 ); + ImGui::Text( "%.3fms" , secDurations_[ i ] ); + ImGui::PopStyleColor( ); } ImGui::EndChild( ); ImGui::SameLine( );