From 5d3d9d7e82a17935646132c4e1d82e97c6da9f5f Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Sat, 12 Apr 2025 23:18:25 +0200 Subject: [PATCH] Improve output log hint when empty #3363 --- Source/Editor/Windows/OutputLogWindow.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Source/Editor/Windows/OutputLogWindow.cs b/Source/Editor/Windows/OutputLogWindow.cs index 3af272710..b087947dc 100644 --- a/Source/Editor/Windows/OutputLogWindow.cs +++ b/Source/Editor/Windows/OutputLogWindow.cs @@ -775,13 +775,16 @@ namespace FlaxEditor.Windows bool showHint = (((int)LogType.Info & _logTypeShowMask) == 0 && ((int)LogType.Warning & _logTypeShowMask) == 0 && ((int)LogType.Error & _logTypeShowMask) == 0) || - String.IsNullOrEmpty(_output.Text); - + string.IsNullOrEmpty(_output.Text) || + _entries.Count == 0; if (showHint) { var textRect = _output.Bounds; var style = Style.Current; - Render2D.DrawText(style.FontMedium, "No log level filter active or no entries that apply to the current filter exist.", textRect, style.ForegroundGrey, TextAlignment.Center, TextAlignment.Center, TextWrapping.WrapWords); + var text = "No log level filter active or no entries that apply to the current filter exist"; + if (_entries.Count == 0) + text = "No log"; + Render2D.DrawText(style.FontMedium, text, textRect, style.ForegroundGrey, TextAlignment.Center, TextAlignment.Center, TextWrapping.WrapWords); } }