@@ -460,6 +460,9 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
if (chatTextField.Text.Length == 0)
|
if (chatTextField.Text.Length == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
// Always scroll to bottom when we've typed something
|
||||||
|
chatPanel.ScrollToBottom();
|
||||||
|
|
||||||
orderManager.IssueOrder(Order.Chat(teamChat, chatTextField.Text));
|
orderManager.IssueOrder(Order.Chat(teamChat, chatTextField.Text));
|
||||||
chatTextField.Text = "";
|
chatTextField.Text = "";
|
||||||
return true;
|
return true;
|
||||||
@@ -534,8 +537,11 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
|||||||
template.Bounds.Height += dh;
|
template.Bounds.Height += dh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var scrolledToBottom = chatPanel.ScrolledToBottom;
|
||||||
chatPanel.AddChild(template);
|
chatPanel.AddChild(template);
|
||||||
chatPanel.ScrollToBottom();
|
if (scrolledToBottom)
|
||||||
|
chatPanel.ScrollToBottom();
|
||||||
|
|
||||||
Sound.PlayNotification(null, "Sounds", "ChatLine", null);
|
Sound.PlayNotification(null, "Sounds", "ChatLine", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user