2019-01-24 08:43:03 +00:00
|
|
|
// 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 09:19:50 +00:00
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2022-01-28 04:53:48 +00:00
|
|
|
using osu.Framework.Localisation;
|
2018-11-20 07:51:59 +00:00
|
|
|
using osuTK.Graphics;
|
2017-05-22 06:11:42 +00:00
|
|
|
using osu.Game.Graphics;
|
2022-01-28 04:53:48 +00:00
|
|
|
using osu.Game.Resources.Localisation.Web;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2017-05-22 06:11:42 +00:00
|
|
|
namespace osu.Game.Users
|
|
|
|
{
|
|
|
|
public abstract class UserStatus
|
|
|
|
{
|
2022-01-28 04:53:48 +00:00
|
|
|
public abstract LocalisableString Message { get; }
|
2017-05-22 15:37:19 +00:00
|
|
|
public abstract Color4 GetAppropriateColour(OsuColour colours);
|
2017-05-22 06:11:42 +00:00
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2018-04-26 10:57:24 +00:00
|
|
|
public class UserStatusOnline : UserStatus
|
2017-05-22 06:11:42 +00:00
|
|
|
{
|
2022-01-28 04:53:48 +00:00
|
|
|
public override LocalisableString Message => UsersStrings.StatusOnline;
|
2020-03-04 11:58:15 +00:00
|
|
|
public override Color4 GetAppropriateColour(OsuColour colours) => colours.GreenLight;
|
2017-05-22 06:11:42 +00:00
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2018-04-26 10:57:24 +00:00
|
|
|
public abstract class UserStatusBusy : UserStatusOnline
|
2017-05-22 06:11:42 +00:00
|
|
|
{
|
2017-05-22 15:37:19 +00:00
|
|
|
public override Color4 GetAppropriateColour(OsuColour colours) => colours.YellowDark;
|
2017-05-22 06:11:42 +00:00
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2017-05-22 15:37:19 +00:00
|
|
|
public class UserStatusOffline : UserStatus
|
|
|
|
{
|
2022-01-28 04:53:48 +00:00
|
|
|
public override LocalisableString Message => UsersStrings.StatusOffline;
|
2020-03-04 11:58:15 +00:00
|
|
|
public override Color4 GetAppropriateColour(OsuColour colours) => Color4.Black;
|
2017-05-22 06:32:02 +00:00
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
2019-05-02 17:44:07 +00:00
|
|
|
public class UserStatusDoNotDisturb : UserStatus
|
2017-05-25 00:09:18 +00:00
|
|
|
{
|
2022-01-28 04:53:48 +00:00
|
|
|
public override LocalisableString Message => "Do not disturb";
|
2017-05-25 00:09:18 +00:00
|
|
|
public override Color4 GetAppropriateColour(OsuColour colours) => colours.RedDark;
|
|
|
|
}
|
2017-05-22 06:11:42 +00:00
|
|
|
}
|