mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 17:02:58 +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.Framework.Screens;
|
||||||
using osu.Game.Online.Spectator;
|
using osu.Game.Online.Spectator;
|
||||||
using osu.Game.Scoring;
|
using osu.Game.Scoring;
|
||||||
|
using osu.Game.Users;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Play
|
namespace osu.Game.Screens.Play
|
||||||
{
|
{
|
||||||
@ -14,6 +15,8 @@ namespace osu.Game.Screens.Play
|
|||||||
{
|
{
|
||||||
private readonly Score score;
|
private readonly Score score;
|
||||||
|
|
||||||
|
protected override UserActivity InitialActivity => new UserActivity.Spectating(score.ScoreInfo.User);
|
||||||
|
|
||||||
public SoloSpectatorPlayer(Score score, PlayerConfiguration configuration = null)
|
public SoloSpectatorPlayer(Score score, PlayerConfiguration configuration = null)
|
||||||
: base(score, configuration)
|
: base(score, configuration)
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
using osu.Game.Online.Rooms;
|
using osu.Game.Online.Rooms;
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -92,7 +93,14 @@ namespace osu.Game.Users
|
|||||||
|
|
||||||
public class Spectating : UserActivity
|
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
|
public class SearchingForLobby : UserActivity
|
||||||
|
Loading…
Reference in New Issue
Block a user