mirror of
https://github.com/ppy/osu
synced 2025-03-02 17:42:13 +00:00
Add Beatmap fields to UserStatusSoloGame & UserStatusEditing so they can carry metadata about the played / edited beatmap
This commit is contained in:
parent
69dda0ffd4
commit
da5d6cb1d4
@ -24,6 +24,7 @@ using osu.Game.Screens.Edit.Design;
|
||||
using osuTK.Input;
|
||||
using System.Collections.Generic;
|
||||
using osu.Framework;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Screens.Edit
|
||||
{
|
||||
@ -47,6 +48,8 @@ namespace osu.Game.Screens.Edit
|
||||
private DependencyContainer dependencies;
|
||||
private GameHost host;
|
||||
|
||||
protected override UserStatus ScreenStatus => new UserStatusEditing(Beatmap.Value.BeatmapInfo);
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
|
||||
|
@ -26,6 +26,7 @@ using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Ranking;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Game.Storyboards.Drawables;
|
||||
using osu.Game.Users;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -33,6 +34,8 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
protected override bool AllowBackButton => false; // handled by HoldForMenuButton
|
||||
|
||||
protected override UserStatus ScreenStatus => new UserStatusSoloGame(Beatmap.Value.BeatmapInfo);
|
||||
|
||||
public override float BackgroundParallaxAmount => 0.1f;
|
||||
|
||||
public override bool HideOverlaysOnEnter => true;
|
||||
|
@ -7,6 +7,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Screens.Play;
|
||||
using osu.Game.Users;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Game.Screens.Select
|
||||
@ -18,6 +19,8 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public override bool AllowExternalScreenChange => true;
|
||||
|
||||
protected override UserStatus ScreenStatus => new UserStatusChoosingBeatmap();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osuTK.Graphics;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Beatmaps;
|
||||
|
||||
namespace osu.Game.Users
|
||||
{
|
||||
@ -41,7 +42,33 @@ namespace osu.Game.Users
|
||||
|
||||
public class UserStatusSoloGame : UserStatusBusy
|
||||
{
|
||||
public UserStatusSoloGame(BeatmapInfo info)
|
||||
{
|
||||
Beatmap = info;
|
||||
}
|
||||
|
||||
public override string Message => @"Solo Game";
|
||||
|
||||
public BeatmapInfo Beatmap { get; }
|
||||
}
|
||||
|
||||
public class UserStatusEditing : UserStatusBusy
|
||||
{
|
||||
public UserStatusEditing(BeatmapInfo info)
|
||||
{
|
||||
Beatmap = info;
|
||||
}
|
||||
|
||||
public override string Message => @"Editing a beatmap";
|
||||
|
||||
public override Color4 GetAppropriateColour(OsuColour colours) => colours.GreenDarker;
|
||||
|
||||
public BeatmapInfo Beatmap { get; }
|
||||
}
|
||||
|
||||
public class UserStatusChoosingBeatmap : UserStatusOnline
|
||||
{
|
||||
public override string Message => @"Choosing a beatmap";
|
||||
}
|
||||
|
||||
public class UserStatusMultiplayerGame : UserStatusBusy
|
||||
|
Loading…
Reference in New Issue
Block a user