Fix speech bubble UI blocking world interaction.

This commit is contained in:
Pieter-Jan Briers
2019-07-31 16:45:54 +02:00
parent ceb8cc8421
commit a7f1520d1f

View File

@@ -81,7 +81,10 @@ namespace Content.Client.Chat
{ {
_netManager.RegisterNetMessage<MsgChatMessage>(MsgChatMessage.NAME, _onChatMessage); _netManager.RegisterNetMessage<MsgChatMessage>(MsgChatMessage.NAME, _onChatMessage);
_speechBubbleRoot = new Control(); _speechBubbleRoot = new Control
{
MouseFilter = Control.MouseFilterMode.Ignore
};
_speechBubbleRoot.SetAnchorPreset(Control.LayoutPreset.Wide); _speechBubbleRoot.SetAnchorPreset(Control.LayoutPreset.Wide);
_userInterfaceManager.StateRoot.AddChild(_speechBubbleRoot); _userInterfaceManager.StateRoot.AddChild(_speechBubbleRoot);
_speechBubbleRoot.SetPositionFirst(); _speechBubbleRoot.SetPositionFirst();
@@ -328,7 +331,7 @@ namespace Content.Client.Chat
{ {
// Word is STILL too long. // Word is STILL too long.
// Truncate it with an ellipse. // Truncate it with an ellipse.
messages.Add($"{word.Substring(0, SingleBubbleCharLimit-3)}..."); messages.Add($"{word.Substring(0, SingleBubbleCharLimit - 3)}...");
currentWordLength = 0; currentWordLength = 0;
continue; continue;
} }