mirror of
https://github.com/ppy/osu.git
synced 2025-02-21 03:02:54 +08:00
Allow UserStatusSoloGame to provide metadata such as the ruleset the current beatmap is played in
This commit is contained in:
parent
5ab278f9ea
commit
361c0ec9f2
@ -43,7 +43,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
});
|
||||
|
||||
flyte.Status.Value = new UserStatusOnline();
|
||||
peppy.Status.Value = new UserStatusSoloGame(new Game.Beatmaps.BeatmapInfo());
|
||||
peppy.Status.Value = new UserStatusSoloGame(null, null);
|
||||
|
||||
AddStep(@"spectating", () => { flyte.Status.Value = new UserStatusSpectating(); });
|
||||
AddStep(@"multiplaying", () => { flyte.Status.Value = new UserStatusMultiplayerGame(); });
|
||||
|
@ -34,7 +34,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
protected override bool AllowBackButton => false; // handled by HoldForMenuButton
|
||||
|
||||
protected override UserStatus ScreenStatus => new UserStatusSoloGame(Beatmap.Value.BeatmapInfo);
|
||||
protected override UserStatus ScreenStatus => new UserStatusSoloGame(Beatmap.Value.BeatmapInfo, Ruleset.Value);
|
||||
|
||||
public override float BackgroundParallaxAmount => 0.1f;
|
||||
|
||||
|
@ -19,6 +19,7 @@ using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Screens.Menu;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
using osu.Game.Screens.Play.PlayerSettings;
|
||||
using osu.Game.Users;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
@ -39,6 +40,8 @@ namespace osu.Game.Screens.Play
|
||||
private bool hideOverlays;
|
||||
public override bool HideOverlaysOnEnter => hideOverlays;
|
||||
|
||||
protected override UserStatus ScreenStatus => null; //shows the previous screen status
|
||||
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||
|
||||
private Task loadTask;
|
||||
|
@ -42,14 +42,17 @@ namespace osu.Game.Users
|
||||
|
||||
public class UserStatusSoloGame : UserStatusBusy
|
||||
{
|
||||
public UserStatusSoloGame(BeatmapInfo info)
|
||||
public UserStatusSoloGame(BeatmapInfo info, Rulesets.RulesetInfo ruleset)
|
||||
{
|
||||
Beatmap = info;
|
||||
Ruleset = ruleset;
|
||||
}
|
||||
|
||||
public override string Message => @"Solo Game";
|
||||
|
||||
public BeatmapInfo Beatmap { get; }
|
||||
|
||||
public Rulesets.RulesetInfo Ruleset { get; }
|
||||
}
|
||||
|
||||
public class UserStatusEditing : UserStatusBusy
|
||||
|
Loading…
Reference in New Issue
Block a user