mirror of
https://github.com/ppy/osu
synced 2024-12-25 08:12:41 +00:00
Added an infoMessage class to represent system messages that aren't errors
This commit is contained in:
parent
29707788f9
commit
18c26a85ba
@ -6,20 +6,11 @@ using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Online.Chat
|
||||
{
|
||||
public class ErrorMessage : Message
|
||||
public class ErrorMessage : InfoMessage
|
||||
{
|
||||
private static int errorId = -1;
|
||||
|
||||
public ErrorMessage(string message) : base(errorId--)
|
||||
public ErrorMessage(string message) : base(message)
|
||||
{
|
||||
Timestamp = DateTimeOffset.Now;
|
||||
Content = message;
|
||||
|
||||
Sender = new User
|
||||
{
|
||||
Username = @"system",
|
||||
Colour = @"ff0000",
|
||||
};
|
||||
Sender.Colour = @"ff0000";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
25
osu.Game/Online/Chat/InfoMessage.cs
Normal file
25
osu.Game/Online/Chat/InfoMessage.cs
Normal file
@ -0,0 +1,25 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Online.Chat
|
||||
{
|
||||
public class InfoMessage : Message
|
||||
{
|
||||
private static int infoID = -1;
|
||||
|
||||
public InfoMessage(string message) : base(infoID--)
|
||||
{
|
||||
Timestamp = DateTimeOffset.Now;
|
||||
Content = message;
|
||||
|
||||
Sender = new User
|
||||
{
|
||||
Username = @"system",
|
||||
Colour = @"0000ff",
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user