diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 4ed853f0..e0021eb3 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -3995,7 +3995,17 @@ int View::DrawCpuData( int offset, double pxns, const ImVec2& wpos, bool hover, char buf[32]; sprintf( buf, "CPU %i", i ); + const auto txtx = ImGui::CalcTextSize( buf ).x; DrawTextContrast( draw, wpos + ImVec2( ty, offset-1 ), 0xFFDD88DD, buf ); + if( hover && ImGui::IsMouseHoveringRect( wpos + ImVec2( 0, offset-1 ), wpos + ImVec2( sty + txtx, offset + sty - 1 ) ) ) + { + ImGui::PopFont(); + ImGui::BeginTooltip(); + TextFocused( "CPU:", RealToString( i, true ) ); + TextFocused( "Context switch regions:", RealToString( cs.size(), true ) ); + ImGui::EndTooltip(); + ImGui::PushFont( m_smallFont ); + } } offset += sstep; }