osu/osu.Game/Users/UserActivity.cs

83 lines
2.2 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.
using osu.Game.Beatmaps;
using osu.Game.Graphics;
2020-12-25 04:38:11 +00:00
using osu.Game.Online.Rooms;
2020-01-03 15:22:33 +00:00
using osu.Game.Rulesets;
using osuTK.Graphics;
namespace osu.Game.Users
{
public abstract class UserActivity
{
public abstract string Status { get; }
public virtual Color4 GetAppropriateColour(OsuColour colours) => colours.GreenDarker;
public class Modding : UserActivity
{
public override string Status => "Modding a map";
public override Color4 GetAppropriateColour(OsuColour colours) => colours.PurpleDark;
}
public class ChoosingBeatmap : UserActivity
{
public override string Status => "Choosing a beatmap";
}
public class MultiplayerGame : UserActivity
{
public override string Status => "Playing with others";
}
public class Editing : UserActivity
{
public BeatmapInfo Beatmap { get; }
public Editing(BeatmapInfo info)
{
Beatmap = info;
}
public override string Status => @"Editing a beatmap";
}
public class SoloGame : UserActivity
{
public BeatmapInfo Beatmap { get; }
2020-01-03 15:22:33 +00:00
public RulesetInfo Ruleset { get; }
2020-01-03 15:22:33 +00:00
public SoloGame(BeatmapInfo info, RulesetInfo ruleset)
{
Beatmap = info;
Ruleset = ruleset;
}
2020-01-03 15:22:33 +00:00
public override string Status => Ruleset.CreateInstance().PlayingVerb;
}
public class Spectating : UserActivity
{
public override string Status => @"Spectating a game";
}
public class SearchingForLobby : UserActivity
{
public override string Status => @"Looking for a lobby";
}
public class InLobby : UserActivity
{
2019-12-18 05:07:21 +00:00
public override string Status => @"In a multiplayer lobby";
public readonly Room Room;
public InLobby(Room room)
{
Room = room;
}
}
}
}