mirror of
https://github.com/wolfpld/tracy
synced 2025-05-02 13:43:52 +00:00
Move filter UI to a separate line in statistics menu.
This commit is contained in:
parent
9b1573d803
commit
2f94b44a6c
@ -11606,6 +11606,10 @@ void View::DrawStatistics()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
ImGui::SeparatorEx( ImGuiSeparatorFlags_Vertical );
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::SameLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11621,13 +11625,6 @@ void View::DrawStatistics()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_statisticsFilter.Draw( ICON_FA_FILTER, 200 );
|
|
||||||
ImGui::SameLine();
|
|
||||||
if( ImGui::Button( ICON_FA_BACKSPACE " Clear" ) )
|
|
||||||
{
|
|
||||||
m_statisticsFilter.Clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto filterActive = m_statisticsFilter.IsActive();
|
const auto filterActive = m_statisticsFilter.IsActive();
|
||||||
auto& slz = m_worker.GetSourceLocationZones();
|
auto& slz = m_worker.GetSourceLocationZones();
|
||||||
Vector<decltype(slz.begin())> srcloc;
|
Vector<decltype(slz.begin())> srcloc;
|
||||||
@ -11684,9 +11681,6 @@ void View::DrawStatistics()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::SameLine();
|
|
||||||
TextFocused( "Total zone count:", RealToString( slzcnt ) );
|
TextFocused( "Total zone count:", RealToString( slzcnt ) );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
@ -11697,6 +11691,16 @@ void View::DrawStatistics()
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Checkbox( ICON_FA_CLOCK " Self time", &m_statSelf );
|
ImGui::Checkbox( ICON_FA_CLOCK " Self time", &m_statSelf );
|
||||||
|
|
||||||
|
ImGui::Separator();
|
||||||
|
TextDisabledUnformatted( "Filter results" );
|
||||||
|
ImGui::SameLine();
|
||||||
|
m_statisticsFilter.Draw( ICON_FA_FILTER, 200 );
|
||||||
|
ImGui::SameLine();
|
||||||
|
if( ImGui::Button( ICON_FA_BACKSPACE " Clear" ) )
|
||||||
|
{
|
||||||
|
m_statisticsFilter.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
if( srcloc.empty() )
|
if( srcloc.empty() )
|
||||||
@ -11782,7 +11786,6 @@ void View::DrawStatistics()
|
|||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::TextUnformatted( TimeToString( ( m_statSelf ? v->second.selfTotal : v->second.total ) / v->second.zones.size() ) );
|
ImGui::TextUnformatted( TimeToString( ( m_statSelf ? v->second.selfTotal : v->second.total ) / v->second.zones.size() ) );
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
|
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
}
|
}
|
||||||
ImGui::EndColumns();
|
ImGui::EndColumns();
|
||||||
@ -11791,15 +11794,6 @@ void View::DrawStatistics()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
m_statisticsFilter.Draw( ICON_FA_FILTER, 200 );
|
|
||||||
ImGui::SameLine();
|
|
||||||
if( ImGui::Button( ICON_FA_BACKSPACE " Clear" ) )
|
|
||||||
{
|
|
||||||
m_statisticsFilter.Clear();
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Spacing();
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Checkbox( ICON_FA_STOPWATCH " Show time", &m_statSampleTime );
|
ImGui::Checkbox( ICON_FA_STOPWATCH " Show time", &m_statSampleTime );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::Checkbox( ICON_FA_CLOCK " Self time", &m_statSelf );
|
ImGui::Checkbox( ICON_FA_CLOCK " Self time", &m_statSelf );
|
||||||
@ -11817,6 +11811,17 @@ void View::DrawStatistics()
|
|||||||
const char* locationTable = "Entry\0Sample\0Smart\0";
|
const char* locationTable = "Entry\0Sample\0Smart\0";
|
||||||
ImGui::SetNextItemWidth( ImGui::CalcTextSize( "Sample" ).x + ImGui::GetTextLineHeight() * 2 );
|
ImGui::SetNextItemWidth( ImGui::CalcTextSize( "Sample" ).x + ImGui::GetTextLineHeight() * 2 );
|
||||||
ImGui::Combo( "##location", &m_statSampleLocation, locationTable );
|
ImGui::Combo( "##location", &m_statSampleLocation, locationTable );
|
||||||
|
|
||||||
|
ImGui::Separator();
|
||||||
|
TextDisabledUnformatted( "Filter results" );
|
||||||
|
ImGui::SameLine();
|
||||||
|
m_statisticsFilter.Draw( ICON_FA_FILTER, 200 );
|
||||||
|
ImGui::SameLine();
|
||||||
|
if( ImGui::Button( ICON_FA_BACKSPACE " Clear" ) )
|
||||||
|
{
|
||||||
|
m_statisticsFilter.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
const auto& symMap = m_worker.GetSymbolMap();
|
const auto& symMap = m_worker.GetSymbolMap();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user