Add watermark attribute to add watermark to string fields in editor. Have watermark show even when textbox is focused .

This commit is contained in:
Chandler Cox
2024-04-27 11:07:20 -05:00
parent c5520f2777
commit d8bb831dd9
3 changed files with 61 additions and 2 deletions

View File

@@ -213,7 +213,7 @@ namespace FlaxEngine.GUI
color *= 0.6f;
Render2D.DrawText(font, _text, color, ref _layout, TextMaterial);
}
else if (!string.IsNullOrEmpty(_watermarkText) && !IsFocused)
else if (!string.IsNullOrEmpty(_watermarkText))
{
Render2D.DrawText(font, _watermarkText, WatermarkTextColor, ref _layout, TextMaterial);
}