mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Replace tabs with radio buttons.
This commit is contained in:
parent
8173f24515
commit
374ddbe2a6
@ -10946,15 +10946,25 @@ void View::DrawStatistics()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool instrumentationTab = true;
|
if( m_worker.AreCallstackSamplesReady() && m_worker.GetCallstackSampleCount() > 0 )
|
||||||
const auto hasSampleData = m_worker.AreCallstackSamplesReady() && m_worker.GetCallstackSampleCount() > 0;
|
|
||||||
if( hasSampleData )
|
|
||||||
{
|
{
|
||||||
ImGui::BeginTabBar( "StatisticsTabBar" );
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
instrumentationTab = ImGui::BeginTabItem( "Instrumentation" );
|
ImGui::RadioButton( ICON_FA_SYRINGE " Instrumentation", &m_statMode, 0 );
|
||||||
|
#else
|
||||||
|
ImGui::RadioButton( "Instrumentation", &m_statMode, 0 );
|
||||||
|
#endif
|
||||||
|
ImGui::SameLine();
|
||||||
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
|
ImGui::RadioButton( ICON_FA_EYE_DROPPER " Sampling", &m_statMode, 1 );
|
||||||
|
#else
|
||||||
|
ImGui::RadioButton( "Sampling", &m_statMode, 1 );
|
||||||
|
#endif
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Spacing();
|
||||||
|
ImGui::SameLine();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( instrumentationTab )
|
if( m_statMode == 0 )
|
||||||
{
|
{
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
m_statisticsFilter.Draw( ICON_FA_FILTER " Filter zones", 200 );
|
m_statisticsFilter.Draw( ICON_FA_FILTER " Filter zones", 200 );
|
||||||
@ -11120,16 +11130,8 @@ void View::DrawStatistics()
|
|||||||
}
|
}
|
||||||
ImGui::EndColumns();
|
ImGui::EndColumns();
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
|
|
||||||
if( hasSampleData )
|
|
||||||
{
|
|
||||||
ImGui::EndTabItem();
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
|
|
||||||
if( hasSampleData )
|
|
||||||
{
|
|
||||||
if( ImGui::BeginTabItem( "Sampling" ) )
|
|
||||||
{
|
{
|
||||||
#ifdef TRACY_EXTENDED_FONT
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
m_statisticsFilter.Draw( ICON_FA_FILTER " Filter zones", 200 );
|
m_statisticsFilter.Draw( ICON_FA_FILTER " Filter zones", 200 );
|
||||||
@ -11292,9 +11294,6 @@ void View::DrawStatistics()
|
|||||||
}
|
}
|
||||||
ImGui::EndColumns();
|
ImGui::EndColumns();
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
ImGui::EndTabItem();
|
|
||||||
}
|
|
||||||
ImGui::EndTabBar();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
@ -344,6 +344,7 @@ private:
|
|||||||
int m_statSort = 0;
|
int m_statSort = 0;
|
||||||
bool m_statSelf = false;
|
bool m_statSelf = false;
|
||||||
bool m_statSampleTime = true;
|
bool m_statSampleTime = true;
|
||||||
|
int m_statMode = 0;
|
||||||
int m_showCallstackFrameAddress = 0;
|
int m_showCallstackFrameAddress = 0;
|
||||||
bool m_showUnknownFrames = true;
|
bool m_showUnknownFrames = true;
|
||||||
bool m_groupChildrenLocations = false;
|
bool m_groupChildrenLocations = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user