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:
parent
9bcc6bf6da
commit
d5b2d9ce97
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user