1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:03:11 +08:00

feat: add support for spectating status

This commit is contained in:
tsrk 2023-02-05 23:58:08 +00:00
parent 9bcc6bf6da
commit d5b2d9ce97
No known key found for this signature in database
GPG Key ID: EBD46BB3049B56D6
2 changed files with 12 additions and 1 deletions

View File

@ -7,6 +7,7 @@ using osu.Framework.Allocation;
using osu.Framework.Screens;
using osu.Game.Online.Spectator;
using osu.Game.Scoring;
using osu.Game.Users;
namespace osu.Game.Screens.Play
{
@ -14,6 +15,8 @@ namespace osu.Game.Screens.Play
{
private readonly Score score;
protected override UserActivity InitialActivity => new UserActivity.Spectating(score.ScoreInfo.User);
public SoloSpectatorPlayer(Score score, PlayerConfiguration configuration = null)
: base(score, configuration)
{

View File

@ -5,6 +5,7 @@
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Online.API.Requests.Responses;
using osu.Game.Online.Rooms;
using osu.Game.Rulesets;
using osuTK.Graphics;
@ -92,7 +93,14 @@ namespace osu.Game.Users
public class Spectating : UserActivity
{
public override string Status => @"Spectating a game";
private readonly APIUser user;
public Spectating(APIUser user)
{
this.user = user;
}
public override string Status => @$"Spectating {user.Username}";
}
public class SearchingForLobby : UserActivity