diff --git a/Robust.Client/UserInterface/Controls/LineEdit.cs b/Robust.Client/UserInterface/Controls/LineEdit.cs index 71ff8398f..5e3c54e35 100644 --- a/Robust.Client/UserInterface/Controls/LineEdit.cs +++ b/Robust.Client/UserInterface/Controls/LineEdit.cs @@ -53,7 +53,7 @@ public class LineEdit : Control private TimeSpan? _lastClickTime; private Vector2? _lastClickPosition; - private bool IsPlaceHolderVisible => string.IsNullOrEmpty(_text) && _placeHolder != null; + private bool IsPlaceHolderVisible => !(HidePlaceHolderOnFocus && HasKeyboardFocus()) && string.IsNullOrEmpty(_text) && _placeHolder != null; public event Action? OnTextChanged; public event Action? OnTextEntered; @@ -186,6 +186,8 @@ public int SelectionStart public int SelectionLower => Math.Min(_selectionStart, _cursorPosition); public int SelectionUpper => Math.Max(_selectionStart, _cursorPosition); + public bool HidePlaceHolderOnFocus { get; set; } + public bool IgnoreNext { get; set; } private (int start, int length)? _imeData;