diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 850e4f86..08197a6b 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -2585,53 +2585,93 @@ void View::DrawOptions() { const auto tw = ImGui::GetFontSize(); ImGui::Begin( "Options", &m_showOptions, ImGuiWindowFlags_AlwaysAutoResize ); - ImGui::Checkbox( "Draw GPU zones", &m_drawGpuZones ); - ImGui::Indent( tw ); - for( size_t i=0; i 0 ) { - char buf[1024]; - sprintf( buf, "GPU context %zu", i ); - ImGui::Checkbox( buf, &Visible( m_worker.GetGpuData()[i] ) ); + ImGui::Checkbox( "Draw GPU zones", &m_drawGpuZones ); + const auto expand = ImGui::TreeNode( "GPU zones" ); + ImGui::SameLine(); + ImGui::TextDisabled( "(%zu)", sz ); + if( expand ) + { + for( size_t i=0; iname ), &Visible( p ) ); + ImGui::Separator(); + ImGui::Checkbox( "Draw plots", &m_drawPlots ); + const auto expand = ImGui::TreeNode( "Plots" ); + ImGui::SameLine(); + ImGui::TextDisabled( "(%zu)", m_worker.GetPlots().size() ); + if( expand ) + { + for( const auto& p : m_worker.GetPlots() ) + { + ImGui::Checkbox( m_worker.GetString( p->name ), &Visible( p ) ); + } + ImGui::TreePop(); + } } - ImGui::Unindent( tw ); + ImGui::Separator(); - ImGui::Text( "Visible threads:" ); - ImGui::Indent( tw ); - int idx = 0; - for( const auto& t : m_worker.GetThreadData() ) + const auto expand = ImGui::TreeNode( "Visible threads:" ); + ImGui::SameLine(); + ImGui::TextDisabled( "(%zu)", m_worker.GetThreadData().size() ); + if( expand ) { - ImGui::PushID( idx++ ); - ImGui::Checkbox( m_worker.GetThreadString( t->id ), &Visible( t ) ); - ImGui::PopID(); + int idx = 0; + for( const auto& t : m_worker.GetThreadData() ) + { + ImGui::PushID( idx++ ); + ImGui::Checkbox( m_worker.GetThreadString( t->id ), &Visible( t ) ); + ImGui::PopID(); + } + ImGui::TreePop(); } - ImGui::Unindent( tw ); ImGui::End(); }