Improve output log hint when empty

#3363
This commit is contained in:
Wojtek Figat
2025-04-12 23:18:25 +02:00
parent 91897f290a
commit 5d3d9d7e82

View File

@@ -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);
}
}