mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Also display number of visible messages.
This commit is contained in:
parent
ccd88a9e27
commit
f41834370c
@ -5775,6 +5775,10 @@ void View::DrawMessages()
|
|||||||
ImGui::Spacing();
|
ImGui::Spacing();
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
TextFocused( "Total message count:", RealToString( msgs.size(), true ) );
|
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
|
#ifdef TRACY_EXTENDED_FONT
|
||||||
auto expand = ImGui::TreeNode( ICON_FA_RANDOM " Visible threads:" );
|
auto expand = ImGui::TreeNode( ICON_FA_RANDOM " Visible threads:" );
|
||||||
@ -5848,6 +5852,7 @@ void View::DrawMessages()
|
|||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
int msgcnt = 0;
|
||||||
const auto filterActive = m_messageFilter.IsActive();
|
const auto filterActive = m_messageFilter.IsActive();
|
||||||
for( const auto& v : msgs )
|
for( const auto& v : msgs )
|
||||||
{
|
{
|
||||||
@ -5881,9 +5886,11 @@ void View::DrawMessages()
|
|||||||
ImGui::TextWrapped( "%s", text );
|
ImGui::TextWrapped( "%s", text );
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
|
msgcnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
m_visibleMessages = msgcnt;
|
||||||
|
|
||||||
if( !filterActive )
|
if( !filterActive )
|
||||||
{
|
{
|
||||||
|
|||||||
@ -270,6 +270,7 @@ private:
|
|||||||
size_t m_prevMessages = 0;
|
size_t m_prevMessages = 0;
|
||||||
ImGuiTextFilter m_messageFilter;
|
ImGuiTextFilter m_messageFilter;
|
||||||
bool m_messageFilterWasActive = false;
|
bool m_messageFilterWasActive = false;
|
||||||
|
int m_visibleMessages = 0;
|
||||||
|
|
||||||
Region m_highlight;
|
Region m_highlight;
|
||||||
Region m_highlightZoom;
|
Region m_highlightZoom;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user