1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-21 09:52:55 +08:00
osu-lazer/osu.Game/Users/UserStatus.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

42 lines
1.3 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-04-13 17:19:50 +08:00
2022-06-17 15:37:17 +08:00
#nullable disable
using osu.Framework.Localisation;
2018-11-20 15:51:59 +08:00
using osuTK.Graphics;
2017-05-22 14:11:42 +08:00
using osu.Game.Graphics;
using osu.Game.Resources.Localisation.Web;
2018-04-13 17:19:50 +08:00
2017-05-22 14:11:42 +08:00
namespace osu.Game.Users
{
public abstract class UserStatus
{
public abstract LocalisableString Message { get; }
public abstract Color4 GetAppropriateColour(OsuColour colours);
2017-05-22 14:11:42 +08:00
}
2018-04-13 17:19:50 +08:00
public class UserStatusOnline : UserStatus
2017-05-22 14:11:42 +08:00
{
public override LocalisableString Message => UsersStrings.StatusOnline;
2020-03-04 19:58:15 +08:00
public override Color4 GetAppropriateColour(OsuColour colours) => colours.GreenLight;
2017-05-22 14:11:42 +08:00
}
2018-04-13 17:19:50 +08:00
public abstract class UserStatusBusy : UserStatusOnline
2017-05-22 14:11:42 +08:00
{
public override Color4 GetAppropriateColour(OsuColour colours) => colours.YellowDark;
2017-05-22 14:11:42 +08:00
}
2018-04-13 17:19:50 +08:00
public class UserStatusOffline : UserStatus
{
public override LocalisableString Message => UsersStrings.StatusOffline;
2020-03-04 19:58:15 +08:00
public override Color4 GetAppropriateColour(OsuColour colours) => Color4.Black;
2017-05-22 14:32:02 +08:00
}
2018-04-13 17:19:50 +08:00
public class UserStatusDoNotDisturb : UserStatus
{
public override LocalisableString Message => "Do not disturb";
public override Color4 GetAppropriateColour(OsuColour colours) => colours.RedDark;
}
2017-05-22 14:11:42 +08:00
}