1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 10:03:05 +08:00

update InitialActivity on multiplayer Player and SongSelect

This commit is contained in:
Nathan Alo 2021-08-14 13:20:36 +08:00
parent 0642a337df
commit a553942a7f
3 changed files with 16 additions and 2 deletions

View File

@ -11,6 +11,7 @@ using osu.Game.Online.Rooms;
using osu.Game.Rulesets; using osu.Game.Rulesets;
using osu.Game.Rulesets.Mods; using osu.Game.Rulesets.Mods;
using osu.Game.Screens.Select; using osu.Game.Screens.Select;
using osu.Game.Users;
namespace osu.Game.Screens.OnlinePlay.Multiplayer namespace osu.Game.Screens.OnlinePlay.Multiplayer
{ {
@ -19,8 +20,13 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
[Resolved] [Resolved]
private MultiplayerClient client { get; set; } private MultiplayerClient client { get; set; }
[Resolved]
private Room room { get; set; }
private LoadingLayer loadingLayer; private LoadingLayer loadingLayer;
protected override UserActivity InitialActivity => new UserActivity.InLobby(room);
/// <summary> /// <summary>
/// Construct a new instance of multiplayer song select. /// Construct a new instance of multiplayer song select.
/// </summary> /// </summary>

View File

@ -17,6 +17,7 @@ using osu.Game.Scoring;
using osu.Game.Screens.Play; using osu.Game.Screens.Play;
using osu.Game.Screens.Play.HUD; using osu.Game.Screens.Play.HUD;
using osu.Game.Screens.Ranking; using osu.Game.Screens.Ranking;
using osu.Game.Users;
using osuTK; using osuTK;
namespace osu.Game.Screens.OnlinePlay.Multiplayer namespace osu.Game.Screens.OnlinePlay.Multiplayer
@ -25,6 +26,8 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
{ {
protected override bool PauseOnFocusLost => false; protected override bool PauseOnFocusLost => false;
protected override UserActivity InitialActivity => new UserActivity.MultiplayerGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
// Disallow fails in multiplayer for now. // Disallow fails in multiplayer for now.
protected override bool CheckModsAllowFailure() => false; protected override bool CheckModsAllowFailure() => false;

View File

@ -25,9 +25,14 @@ namespace osu.Game.Users
public override string Status => "Choosing a beatmap"; public override string Status => "Choosing a beatmap";
} }
public class MultiplayerGame : UserActivity public class MultiplayerGame : SoloGame
{ {
public override string Status => "Playing with others"; public MultiplayerGame(BeatmapInfo beatmap, RulesetInfo ruleset)
: base(beatmap, ruleset)
{
}
public override string Status => $@"{base.Status} with others";
} }
public class Editing : UserActivity public class Editing : UserActivity