mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 04:23:51 +00:00
Add an option to display only the file part of image name.
This commit is contained in:
parent
3ac95e6902
commit
408939862b
@ -517,6 +517,7 @@ private:
|
|||||||
AccumulationMode m_statAccumulationMode = AccumulationMode::SelfOnly;
|
AccumulationMode m_statAccumulationMode = AccumulationMode::SelfOnly;
|
||||||
bool m_statSampleTime = true;
|
bool m_statSampleTime = true;
|
||||||
int m_statMode = 0;
|
int m_statMode = 0;
|
||||||
|
bool m_shortImageNames = false;
|
||||||
int m_flameMode = 0;
|
int m_flameMode = 0;
|
||||||
bool m_flameSort = false;
|
bool m_flameSort = false;
|
||||||
bool m_flameRunningTime = false;
|
bool m_flameRunningTime = false;
|
||||||
|
@ -522,7 +522,17 @@ void View::DrawSamplesStatistics( Vector<SymList>& data, int64_t timeRange, Accu
|
|||||||
ImGui::Unindent( indentVal );
|
ImGui::Unindent( indentVal );
|
||||||
}
|
}
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
TextDisabledUnformatted( imageName );
|
if( m_shortImageNames )
|
||||||
|
{
|
||||||
|
const char* end = imageName + strlen( imageName ) - 1;
|
||||||
|
while( end > imageName && *end != '/' && *end != '\\' ) end--;
|
||||||
|
if( *end == '/' || *end == '\\' ) end++;
|
||||||
|
TextDisabledUnformatted( end );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TextDisabledUnformatted( imageName );
|
||||||
|
}
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
const auto baseCnt = cnt;
|
const auto baseCnt = cnt;
|
||||||
if( cnt > 0 )
|
if( cnt > 0 )
|
||||||
|
@ -474,6 +474,8 @@ void View::DrawStatistics()
|
|||||||
{
|
{
|
||||||
TextDisabledUnformatted( "Image" );
|
TextDisabledUnformatted( "Image" );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
ToggleButton( ICON_FA_SCISSORS, m_shortImageNames );
|
||||||
|
ImGui::SameLine();
|
||||||
m_statisticsImageFilter.Draw( ICON_FA_FILTER "###imageFilter", 200 );
|
m_statisticsImageFilter.Draw( ICON_FA_FILTER "###imageFilter", 200 );
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if( ImGui::BeginCombo( "###imageCombo", nullptr, ImGuiComboFlags_NoPreview | ImGuiComboFlags_HeightLarge ) )
|
if( ImGui::BeginCombo( "###imageCombo", nullptr, ImGuiComboFlags_NoPreview | ImGuiComboFlags_HeightLarge ) )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user