From 5280d6586b65e2ae74e0e25889b3e0095a367424 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 21 Oct 2018 15:46:02 +0200 Subject: [PATCH] Switching active frame set by clicking on a frame. --- server/TracyView.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 3fe2f88f..23bc482d 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1442,13 +1442,20 @@ bool View::DrawZoneFrames( const FrameData& frames ) prev = -1; } - if( hover && !tooltipDisplayed ) + if( hover ) { - ImGui::BeginTooltip(); - ImGui::TextDisabled( "Frame set:" ); - ImGui::SameLine(); - ImGui::Text( "%s", frames.name == 0 ? "Frames" : m_worker.GetString( frames.name ) ); - ImGui::EndTooltip(); + if( !tooltipDisplayed ) + { + ImGui::BeginTooltip(); + ImGui::TextDisabled( "Frame set:" ); + ImGui::SameLine(); + ImGui::Text( "%s", frames.name == 0 ? "Frames" : m_worker.GetString( frames.name ) ); + ImGui::EndTooltip(); + } + if( ImGui::IsMouseClicked( 0 ) ) + { + m_frames = &frames; + } } return hover;