mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Allow disabling frame sets.
This commit is contained in:
parent
1ea1cd57b3
commit
88d9307d7a
@ -1065,7 +1065,10 @@ void View::DrawZones()
|
|||||||
auto& frames = m_worker.GetFrames();
|
auto& frames = m_worker.GetFrames();
|
||||||
for( auto fd : frames )
|
for( auto fd : frames )
|
||||||
{
|
{
|
||||||
drawMouseLine |= DrawZoneFrames( *fd );
|
if( Visible( fd ) )
|
||||||
|
{
|
||||||
|
drawMouseLine |= DrawZoneFrames( *fd );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::BeginChild( "##zoneWin", ImVec2( ImGui::GetWindowContentRegionWidth(), ImGui::GetContentRegionAvail().y ), false, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_NoScrollWithMouse );
|
ImGui::BeginChild( "##zoneWin", ImVec2( ImGui::GetWindowContentRegionWidth(), ImGui::GetContentRegionAvail().y ), false, ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_NoScrollWithMouse );
|
||||||
@ -3683,7 +3686,7 @@ void View::DrawOptions()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
const auto expand = ImGui::TreeNode( "Visible threads:" );
|
auto expand = ImGui::TreeNode( "Visible threads:" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::TextDisabled( "(%zu)", m_worker.GetThreadData().size() );
|
ImGui::TextDisabled( "(%zu)", m_worker.GetThreadData().size() );
|
||||||
if( expand )
|
if( expand )
|
||||||
@ -3715,6 +3718,40 @@ void View::DrawOptions()
|
|||||||
}
|
}
|
||||||
ImGui::TreePop();
|
ImGui::TreePop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui::Separator();
|
||||||
|
expand = ImGui::TreeNode( "Visible frame sets:" );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::TextDisabled( "(%zu)", m_worker.GetFrames().size() );
|
||||||
|
if( expand )
|
||||||
|
{
|
||||||
|
if( ImGui::SmallButton( "Select all" ) )
|
||||||
|
{
|
||||||
|
for( const auto& fd : m_worker.GetFrames() )
|
||||||
|
{
|
||||||
|
Visible( fd ) = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ImGui::SameLine();
|
||||||
|
if( ImGui::SmallButton( "Unselect all" ) )
|
||||||
|
{
|
||||||
|
for( const auto& fd : m_worker.GetFrames() )
|
||||||
|
{
|
||||||
|
Visible( fd ) = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int idx = 0;
|
||||||
|
for( const auto& fd : m_worker.GetFrames() )
|
||||||
|
{
|
||||||
|
ImGui::PushID( idx++ );
|
||||||
|
ImGui::Checkbox( fd->name == 0 ? "Base frame set" : m_worker.GetString( fd->name ), &Visible( fd ) );
|
||||||
|
ImGui::PopID();
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::TextDisabled( "%s frames", RealToString( fd->frames.size(), true ) );
|
||||||
|
}
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user