From 9e23c324bf45d9df8a172ca25661c716fbe771e8 Mon Sep 17 00:00:00 2001 From: xxSeys1 Date: Thu, 10 Apr 2025 00:01:31 +0200 Subject: [PATCH] add a hint to the Output Log if there are no messages shown because of filters --- Source/Editor/Windows/OutputLogWindow.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Source/Editor/Windows/OutputLogWindow.cs b/Source/Editor/Windows/OutputLogWindow.cs index b130d8d94..3af272710 100644 --- a/Source/Editor/Windows/OutputLogWindow.cs +++ b/Source/Editor/Windows/OutputLogWindow.cs @@ -767,6 +767,24 @@ namespace FlaxEditor.Windows } } + /// + public override void Draw() + { + base.Draw(); + + bool showHint = (((int)LogType.Info & _logTypeShowMask) == 0 && + ((int)LogType.Warning & _logTypeShowMask) == 0 && + ((int)LogType.Error & _logTypeShowMask) == 0) || + String.IsNullOrEmpty(_output.Text); + + 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); + } + } + /// public override bool OnKeyDown(KeyboardKeys key) {