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