Display memory limit in notification area.

This commit is contained in:
Bartosz Taudul 2024-05-05 20:59:25 +02:00
parent 5f0cac546b
commit b64389ba15
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 13 additions and 0 deletions

View File

@ -997,6 +997,18 @@ bool View::DrawImpl()
dx = ImGui::GetCursorPosX() - cx;
if( dx < targetLabelSize ) ImGui::SameLine( cx + targetLabelSize );
ImGui::Spacing();
if( m_worker.GetMemoryLimit() > 0 )
{
ImGui::SameLine();
TextColoredUnformatted( 0xFF00FFFF, ICON_FA_TRIANGLE_EXCLAMATION );
if( ImGui::IsItemHovered() )
{
ImGui::BeginTooltip();
ImGui::Text( "Memory limit: %s", MemSizeToString( m_worker.GetMemoryLimit() ) );
ImGui::EndTooltip();
}
}
}
DrawNotificationArea();

View File

@ -643,6 +643,7 @@ public:
void Shutdown() { m_shutdown.store( true, std::memory_order_relaxed ); }
void Disconnect();
bool WasDisconnectIssued() const { return m_disconnect; }
int64_t GetMemoryLimit() const { return m_memoryLimit; }
void Write( FileWrite& f, bool fiDict );
int GetTraceVersion() const { return m_traceVersion; }