Fix missing default value of localized string in editor
This commit is contained in:
@@ -35,7 +35,7 @@ namespace FlaxEditor.CustomEditors.Editors
|
|||||||
}
|
}
|
||||||
|
|
||||||
_element = layout.TextBox(isMultiLine);
|
_element = layout.TextBox(isMultiLine);
|
||||||
_defaultWatermarkColor = _element.TextBox.WatermarkTextColor;
|
_watermarkColor = _defaultWatermarkColor = _element.TextBox.WatermarkTextColor;
|
||||||
if (watermarkAttribute is WatermarkAttribute watermark)
|
if (watermarkAttribute is WatermarkAttribute watermark)
|
||||||
{
|
{
|
||||||
_watermarkText = watermark.WatermarkText;
|
_watermarkText = watermark.WatermarkText;
|
||||||
|
|||||||
@@ -298,9 +298,13 @@ namespace FlaxEngine.GUI
|
|||||||
color *= 0.85f;
|
color *= 0.85f;
|
||||||
Render2D.DrawText(font, text, color, ref _layout, TextMaterial);
|
Render2D.DrawText(font, text, color, ref _layout, TextMaterial);
|
||||||
}
|
}
|
||||||
else if (!string.IsNullOrEmpty(_watermarkText))
|
else
|
||||||
{
|
{
|
||||||
Render2D.DrawText(font, _watermarkText, WatermarkTextColor, ref _layout, TextMaterial);
|
text = _watermarkText;
|
||||||
|
if (text.Length > 0)
|
||||||
|
{
|
||||||
|
Render2D.DrawText(font, _watermarkText, WatermarkTextColor, ref _layout, TextMaterial);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Caret
|
// Caret
|
||||||
|
|||||||
Reference in New Issue
Block a user