1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Migrate drawing CPU threads to the new timeline item system.

This commit is contained in:
Bartosz Taudul
2022-09-03 23:28:54 +02:00
parent e3007062fc
commit ec3dcaeef3
8 changed files with 541 additions and 406 deletions
+3 -3
View File
@@ -586,7 +586,7 @@ void View::DrawOptions()
{
for( const auto& t : m_threadOrder )
{
m_tc.Vis( t ).visible = true;
m_tc.GetItem( t ).SetVisible( true );
}
}
ImGui::SameLine();
@@ -594,7 +594,7 @@ void View::DrawOptions()
{
for( const auto& t : m_threadOrder )
{
m_tc.Vis( t ).visible = false;
m_tc.GetItem( t ).SetVisible( false );
}
}
@@ -609,7 +609,7 @@ void View::DrawOptions()
const auto threadColor = GetThreadColor( t->id, 0 );
SmallColorBox( threadColor );
ImGui::SameLine();
SmallCheckbox( threadName, &m_tc.Vis( t ).visible );
m_tc.GetItem( t ).VisibilityCheckbox();
if( ImGui::BeginDragDropSource( ImGuiDragDropFlags_SourceNoHoldToOpenOthers ) )
{
ImGui::SetDragDropPayload( "ThreadOrder", &idx, sizeof(int) );