Add icons to options menu.

This commit is contained in:
Bartosz Taudul 2018-08-18 00:21:01 +02:00
parent 8db30a9016
commit 07952f0a1f

View File

@ -602,7 +602,7 @@ bool View::DrawImpl()
#endif #endif
ImGui::SameLine(); ImGui::SameLine();
#ifdef TRACY_EXTENDED_FONT #ifdef TRACY_EXTENDED_FONT
if( ImGui::Button( ICON_FA_MICROCHIP " Memory" ) ) m_memInfo.show = true; if( ImGui::Button( ICON_FA_MEMORY " Memory" ) ) m_memInfo.show = true;
#else #else
if( ImGui::Button( "Memory" ) ) m_memInfo.show = true; if( ImGui::Button( "Memory" ) ) m_memInfo.show = true;
#endif #endif
@ -4008,7 +4008,11 @@ void View::DrawOptions()
const auto& gpuData = m_worker.GetGpuData(); const auto& gpuData = m_worker.GetGpuData();
if( !gpuData.empty() ) if( !gpuData.empty() )
{ {
#ifdef TRACY_EXTENDED_FONT
ImGui::Checkbox( ICON_FA_EYE " Draw GPU zones", &m_drawGpuZones );
#else
ImGui::Checkbox( "Draw GPU zones", &m_drawGpuZones ); ImGui::Checkbox( "Draw GPU zones", &m_drawGpuZones );
#endif
const auto expand = ImGui::TreeNode( "GPU zones" ); const auto expand = ImGui::TreeNode( "GPU zones" );
ImGui::SameLine(); ImGui::SameLine();
ImGui::TextDisabled( "(%zu)", gpuData.size() ); ImGui::TextDisabled( "(%zu)", gpuData.size() );
@ -4038,7 +4042,11 @@ void View::DrawOptions()
} }
} }
#ifdef TRACY_EXTENDED_FONT
ImGui::Checkbox( ICON_FA_MICROCHIP " Draw CPU zones", &m_drawZones );
#else
ImGui::Checkbox( "Draw CPU zones", &m_drawZones ); ImGui::Checkbox( "Draw CPU zones", &m_drawZones );
#endif
int ns = (int)m_namespace; int ns = (int)m_namespace;
ImGui::Combo( "Namespaces", &ns, "Full\0Shortened\0None\0" ); ImGui::Combo( "Namespaces", &ns, "Full\0Shortened\0None\0" );
m_namespace = (Namespace)ns; m_namespace = (Namespace)ns;
@ -4046,7 +4054,11 @@ void View::DrawOptions()
if( !m_worker.GetLockMap().empty() ) if( !m_worker.GetLockMap().empty() )
{ {
ImGui::Separator(); ImGui::Separator();
#ifdef TRACY_EXTENDED_FONT
ImGui::Checkbox( ICON_FA_LOCK " Draw locks", &m_drawLocks );
#else
ImGui::Checkbox( "Draw locks", &m_drawLocks ); ImGui::Checkbox( "Draw locks", &m_drawLocks );
#endif
ImGui::SameLine(); ImGui::SameLine();
ImGui::Checkbox( "Only contended", &m_onlyContendedLocks ); ImGui::Checkbox( "Only contended", &m_onlyContendedLocks );
const auto expand = ImGui::TreeNode( "Locks" ); const auto expand = ImGui::TreeNode( "Locks" );
@ -4094,7 +4106,11 @@ void View::DrawOptions()
if( !m_worker.GetPlots().empty() ) if( !m_worker.GetPlots().empty() )
{ {
ImGui::Separator(); ImGui::Separator();
#ifdef TRACY_EXTENDED_FONT
ImGui::Checkbox( ICON_FA_SIGNATURE " Draw plots", &m_drawPlots );
#else
ImGui::Checkbox( "Draw plots", &m_drawPlots ); ImGui::Checkbox( "Draw plots", &m_drawPlots );
#endif
const auto expand = ImGui::TreeNode( "Plots" ); const auto expand = ImGui::TreeNode( "Plots" );
ImGui::SameLine(); ImGui::SameLine();
ImGui::TextDisabled( "(%zu)", m_worker.GetPlots().size() ); ImGui::TextDisabled( "(%zu)", m_worker.GetPlots().size() );
@ -4127,7 +4143,11 @@ void View::DrawOptions()
} }
ImGui::Separator(); ImGui::Separator();
#ifdef TRACY_EXTENDED_FONT
auto expand = ImGui::TreeNode( ICON_FA_RANDOM " Visible threads:" );
#else
auto expand = ImGui::TreeNode( "Visible threads:" ); auto expand = ImGui::TreeNode( "Visible threads:" );
#endif
ImGui::SameLine(); ImGui::SameLine();
ImGui::TextDisabled( "(%zu)", m_worker.GetThreadData().size() ); ImGui::TextDisabled( "(%zu)", m_worker.GetThreadData().size() );
if( expand ) if( expand )
@ -4161,7 +4181,11 @@ void View::DrawOptions()
} }
ImGui::Separator(); ImGui::Separator();
#ifdef TRACY_EXTENDED_FONT
expand = ImGui::TreeNode( ICON_FA_IMAGES " Visible frame sets:" );
#else
expand = ImGui::TreeNode( "Visible frame sets:" ); expand = ImGui::TreeNode( "Visible frame sets:" );
#endif
ImGui::SameLine(); ImGui::SameLine();
ImGui::TextDisabled( "(%zu)", m_worker.GetFrames().size() ); ImGui::TextDisabled( "(%zu)", m_worker.GetFrames().size() );
if( expand ) if( expand )