diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-08-16 19:43:13 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-08-16 19:43:13 +0300 |
commit | 3aa62a18cca1a1a0ce04ce103d82499221c4675c (patch) | |
tree | 2f5c91d00a167ce91dd18492657745b3a03e754a /server/TracyView_Timeline.cpp | |
parent | fa8a0713348cfdc9cb15cc9d89dd960030760069 (diff) |
Context menu hide of GPU zones.
Diffstat (limited to 'server/TracyView_Timeline.cpp')
-rw-r--r-- | server/TracyView_Timeline.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/server/TracyView_Timeline.cpp b/server/TracyView_Timeline.cpp index 43d5c550..38be35f0 100644 --- a/server/TracyView_Timeline.cpp +++ b/server/TracyView_Timeline.cpp @@ -318,6 +318,7 @@ void View::DrawTimeline() continue; } bool& showFull = vis.showFull; + ImGui::PushID( &vis ); const auto yPos = AdjustThreadPosition( vis, wpos.y, offset ); const auto oldOffset = offset; @@ -468,6 +469,10 @@ void View::DrawTimeline() ZoomToRange( t0, t1 ); } } + if( IsMouseClicked( 1 ) ) + { + ImGui::OpenPopup( "menuPopup" ); + } ImGui::BeginTooltip(); ImGui::TextUnformatted( buf ); @@ -570,8 +575,19 @@ void View::DrawTimeline() } } + if( ImGui::BeginPopup( "menuPopup" ) ) + { + if( ImGui::MenuItem( ICON_FA_EYE_SLASH " Hide" ) ) + { + vis.visible = false; + ImGui::CloseCurrentPopup(); + } + ImGui::EndPopup(); + } + AdjustThreadHeight( vis, oldOffset, offset ); ImGui::PopClipRect(); + ImGui::PopID(); } } |