osu/osu.Game/Users/UserStatus.cs

68 lines
2.0 KiB
C#
Raw Normal View History

2018-01-05 11:21:19 +00:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
2017-05-22 06:11:42 +00:00
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using OpenTK.Graphics;
using osu.Game.Graphics;
namespace osu.Game.Users
{
public abstract class UserStatus
{
public abstract string Message { get; }
public abstract Color4 GetAppropriateColour(OsuColour colours);
2017-05-22 06:11:42 +00:00
}
public abstract class UserStatusAvailable : UserStatus
{
public override Color4 GetAppropriateColour(OsuColour colours) => colours.BlueDarker;
2017-05-22 06:11:42 +00:00
}
public abstract class UserStatusBusy : UserStatus
{
public override Color4 GetAppropriateColour(OsuColour colours) => colours.YellowDark;
2017-05-22 06:11:42 +00:00
}
public class UserStatusOffline : UserStatus
{
2017-05-22 06:37:36 +00:00
public override string Message => @"Offline";
public override Color4 GetAppropriateColour(OsuColour colours) => colours.Gray7;
2017-05-22 06:32:02 +00:00
}
2017-05-22 06:11:42 +00:00
public class UserStatusOnline : UserStatusAvailable
{
public override string Message => @"Online";
}
public class UserStatusSpectating : UserStatusAvailable
{
2017-05-22 06:37:36 +00:00
public override string Message => @"Spectating a game";
2017-05-22 06:11:42 +00:00
}
public class UserStatusInLobby : UserStatusAvailable
{
2017-05-22 06:37:36 +00:00
public override string Message => @"in Multiplayer Lobby";
2017-05-22 06:11:42 +00:00
}
public class UserStatusSoloGame : UserStatusBusy
{
2017-05-22 06:37:36 +00:00
public override string Message => @"Solo Game";
2017-05-22 06:11:42 +00:00
}
public class UserStatusMultiplayerGame : UserStatusBusy
2017-05-22 06:11:42 +00:00
{
2017-05-22 06:37:36 +00:00
public override string Message => @"Multiplaying";
2017-05-22 06:11:42 +00:00
}
public class UserStatusModding : UserStatus
{
2017-05-22 06:37:36 +00:00
public override string Message => @"Modding a map";
public override Color4 GetAppropriateColour(OsuColour colours) => colours.PurpleDark;
2017-05-22 06:11:42 +00:00
}
2017-05-25 01:26:48 +00:00
public class UserStatusDoNotDisturb : UserStatus
{
public override string Message => @"Do not disturb";
public override Color4 GetAppropriateColour(OsuColour colours) => colours.RedDark;
}
2017-05-22 06:11:42 +00:00
}