Use icons in main profiler window buttons.

This commit is contained in:
Bartosz Taudul 2018-08-17 19:03:35 +02:00
parent 7cfcdee053
commit 0de3e088d9
2 changed files with 44 additions and 0 deletions

View File

@ -108,6 +108,14 @@ int main( int argc, char** argv )
0xF1EB, 0xF1EB, // wifi 0xF1EB, 0xF1EB, // wifi
0xF011, 0xF011, // power off 0xF011, 0xF011, // power off
0xF56F, 0xF56F, // file-import 0xF56F, 0xF56F, // file-import
0xF013, 0xF013, // cog
0xF02B, 0xF02B, // tag
0xF002, 0xF002, // search
0xF161, 0xF161, // sort-amount-up
0xF538, 0xF538, // memory
0xF24E, 0xF24E, // balancing scale
0xF577, 0xF577, // fingerprint
0xF0D9, 0xF0DA, // caret left, right
0 0
}; };
ImFontConfig configMerge; ImFontConfig configMerge;

View File

@ -568,21 +568,53 @@ bool View::DrawImpl()
ImGui::PopStyleColor( 3 ); ImGui::PopStyleColor( 3 );
} }
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::Button( "\xef\x80\x93 Options" ) ) m_showOptions = true;
#else
if( ImGui::Button( "Options" ) ) m_showOptions = true; if( ImGui::Button( "Options" ) ) m_showOptions = true;
#endif
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::Button( "\xef\x80\xab Messages" ) ) m_showMessages = true;
#else
if( ImGui::Button( "Messages" ) ) m_showMessages = true; if( ImGui::Button( "Messages" ) ) m_showMessages = true;
#endif
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::Button( "\xef\x80\x82 Find zone" ) ) m_findZone.show = true;
#else
if( ImGui::Button( "Find zone" ) ) m_findZone.show = true; if( ImGui::Button( "Find zone" ) ) m_findZone.show = true;
#endif
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::Button( "\xef\x85\xa1 Statistics" ) ) m_showStatistics = true;
#else
if( ImGui::Button( "Statistics" ) ) m_showStatistics = true; if( ImGui::Button( "Statistics" ) ) m_showStatistics = true;
#endif
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::Button( "\xef\x94\xb8 Memory" ) ) m_memInfo.show = true;
#else
if( ImGui::Button( "Memory" ) ) m_memInfo.show = true; if( ImGui::Button( "Memory" ) ) m_memInfo.show = true;
#endif
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::Button( "\xef\x89\x8e Compare" ) ) m_compare.show = true;
#else
if( ImGui::Button( "Compare" ) ) m_compare.show = true; if( ImGui::Button( "Compare" ) ) m_compare.show = true;
#endif
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::Button( "\xef\x95\xb7 Info" ) ) m_showInfo = true;
#else
if( ImGui::Button( "Info" ) ) m_showInfo = true; if( ImGui::Button( "Info" ) ) m_showInfo = true;
#endif
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::SmallButton( "\xef\x83\x99" ) ) ZoomToPrevFrame();
#else
if( ImGui::SmallButton( "<" ) ) ZoomToPrevFrame(); if( ImGui::SmallButton( "<" ) ) ZoomToPrevFrame();
#endif
ImGui::SameLine(); ImGui::SameLine();
{ {
const auto vis = Visible( m_frames ); const auto vis = Visible( m_frames );
@ -597,7 +629,11 @@ bool View::DrawImpl()
} }
} }
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT
if( ImGui::SmallButton( "\xef\x83\x9a" ) ) ZoomToNextFrame();
#else
if( ImGui::SmallButton( ">" ) ) ZoomToNextFrame(); if( ImGui::SmallButton( ">" ) ) ZoomToNextFrame();
#endif
ImGui::SameLine(); ImGui::SameLine();
if( ImGui::BeginCombo( "##frameCombo", nullptr, ImGuiComboFlags_NoPreview ) ) if( ImGui::BeginCombo( "##frameCombo", nullptr, ImGuiComboFlags_NoPreview ) )
{ {