1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00
This commit is contained in:
cdwcgt 2023-06-14 01:32:27 +09:00
parent 432b5e2d25
commit 51451bd53e
No known key found for this signature in database
GPG Key ID: 144396D01095C3A2

View File

@ -41,10 +41,14 @@ namespace osu.Game.Tests.Visual.Online
private void addMessageWithChecks(string text, bool isAction = false, bool isImportant = false, string username = null, Colour4? color = null)
{
int index = textContainer.Count + 1;
var newLine = new ChatLine(new DummyMessage(text, isAction, isImportant, index, username))
{
UsernameColour = color
};
var newLine = color != null
? new ChatLine(new DummyMessage(text, isAction, isImportant, index, username))
{
UsernameColour = color.Value
}
: new ChatLine(new DummyMessage(text, isAction, isImportant, index, username));
textContainer.Add(newLine);
}