Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-08-16 19:43:13 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-08-16 19:43:13 +0300
commit3aa62a18cca1a1a0ce04ce103d82499221c4675c (patch)
tree2f5c91d00a167ce91dd18492657745b3a03e754a /server/TracyView_Timeline.cpp
parentfa8a0713348cfdc9cb15cc9d89dd960030760069 (diff)
Context menu hide of GPU zones.
Diffstat (limited to 'server/TracyView_Timeline.cpp')
-rw-r--r--server/TracyView_Timeline.cpp16
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();
}
}