Chat now sends formatted messages to allow more complex messages.

This commit is contained in:
Pieter-Jan Briers
2021-02-28 18:51:30 +01:00
parent 11c42f1d59
commit cb8d7730ad
3 changed files with 33 additions and 2 deletions

View File

@@ -154,6 +154,20 @@ namespace Content.Client.Chat
Contents.AddMessage(formatted);
}
public void AddLine(FormattedMessage message, Color color)
{
if (Disposed)
{
return;
}
var formatted = new FormattedMessage(3);
formatted.PushColor(color);
formatted.AddMessage(message);
formatted.Pop();
Contents.AddMessage(formatted);
}
private void Input_OnTextEntered(LineEdit.LineEditEventArgs args)
{
// We set it there to true so it's set to false by TextSubmitted.Invoke if necessary