mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 02:03:20 +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();
|
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(@"spectating", () => { flyte.Status.Value = new UserStatusSpectating(); });
|
||||||
AddStep(@"multiplaying", () => { flyte.Status.Value = new UserStatusMultiplayerGame(); });
|
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 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;
|
public override float BackgroundParallaxAmount => 0.1f;
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ using osu.Game.Graphics.UserInterface;
|
|||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osu.Game.Screens.Play.HUD;
|
using osu.Game.Screens.Play.HUD;
|
||||||
using osu.Game.Screens.Play.PlayerSettings;
|
using osu.Game.Screens.Play.PlayerSettings;
|
||||||
|
using osu.Game.Users;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -39,6 +40,8 @@ namespace osu.Game.Screens.Play
|
|||||||
private bool hideOverlays;
|
private bool hideOverlays;
|
||||||
public override bool HideOverlaysOnEnter => hideOverlays;
|
public override bool HideOverlaysOnEnter => hideOverlays;
|
||||||
|
|
||||||
|
protected override UserStatus ScreenStatus => null; //shows the previous screen status
|
||||||
|
|
||||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
|
|
||||||
private Task loadTask;
|
private Task loadTask;
|
||||||
|
@ -42,14 +42,17 @@ namespace osu.Game.Users
|
|||||||
|
|
||||||
public class UserStatusSoloGame : UserStatusBusy
|
public class UserStatusSoloGame : UserStatusBusy
|
||||||
{
|
{
|
||||||
public UserStatusSoloGame(BeatmapInfo info)
|
public UserStatusSoloGame(BeatmapInfo info, Rulesets.RulesetInfo ruleset)
|
||||||
{
|
{
|
||||||
Beatmap = info;
|
Beatmap = info;
|
||||||
|
Ruleset = ruleset;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string Message => @"Solo Game";
|
public override string Message => @"Solo Game";
|
||||||
|
|
||||||
public BeatmapInfo Beatmap { get; }
|
public BeatmapInfo Beatmap { get; }
|
||||||
|
|
||||||
|
public Rulesets.RulesetInfo Ruleset { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UserStatusEditing : UserStatusBusy
|
public class UserStatusEditing : UserStatusBusy
|
||||||
|
Loading…
Reference in New Issue
Block a user