Entering text into lobby chat box does not release focus.
This commit is contained in:
@@ -38,6 +38,8 @@ namespace Content.Client.Chat
|
||||
/// </summary>
|
||||
public string DefaultChatFormat { get; set; }
|
||||
|
||||
public bool ReleaseFocusOnEnter { get; set; } = true;
|
||||
|
||||
protected override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -151,7 +153,11 @@ namespace Content.Client.Chat
|
||||
_inputIndex = -1;
|
||||
|
||||
Input.Clear();
|
||||
Input.ReleaseKeyboardFocus();
|
||||
|
||||
if (ReleaseFocusOnEnter)
|
||||
{
|
||||
Input.ReleaseKeyboardFocus();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Client.UserInterface
|
||||
base.Initialize();
|
||||
|
||||
var chatContainer = GetChild("Panel/VBoxContainer/HBoxContainer/LeftVBox");
|
||||
Chat = new ChatBox();
|
||||
Chat = new ChatBox {ReleaseFocusOnEnter = false};
|
||||
chatContainer.AddChild(Chat);
|
||||
Chat.SizeFlagsVertical = SizeFlags.FillExpand;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user