Also display number of visible messages.

This commit is contained in:
Bartosz Taudul 2019-07-31 02:16:14 +02:00
parent ccd88a9e27
commit f41834370c
2 changed files with 8 additions and 0 deletions

View File

@ -5775,6 +5775,10 @@ void View::DrawMessages()
ImGui::Spacing();
ImGui::SameLine();
TextFocused( "Total message count:", RealToString( msgs.size(), true ) );
ImGui::SameLine();
ImGui::Spacing();
ImGui::SameLine();
TextFocused( "Visible messages:", RealToString( m_visibleMessages, true ) );
#ifdef TRACY_EXTENDED_FONT
auto expand = ImGui::TreeNode( ICON_FA_RANDOM " Visible threads:" );
@ -5848,6 +5852,7 @@ void View::DrawMessages()
ImGui::NextColumn();
ImGui::Separator();
int msgcnt = 0;
const auto filterActive = m_messageFilter.IsActive();
for( const auto& v : msgs )
{
@ -5881,9 +5886,11 @@ void View::DrawMessages()
ImGui::TextWrapped( "%s", text );
ImGui::PopStyleColor();
ImGui::NextColumn();
msgcnt++;
}
}
}
m_visibleMessages = msgcnt;
if( !filterActive )
{

View File

@ -270,6 +270,7 @@ private:
size_t m_prevMessages = 0;
ImGuiTextFilter m_messageFilter;
bool m_messageFilterWasActive = false;
int m_visibleMessages = 0;
Region m_highlight;
Region m_highlightZoom;