Add `TestingBeatmap` activity

This commit is contained in:
Joseph Madamba 2023-02-12 13:04:12 -08:00
parent afb66d8af4
commit bbeef53569
3 changed files with 14 additions and 0 deletions

View File

@ -118,6 +118,7 @@ public void TestUserActivity()
AddStep("choosing", () => activity.Value = new UserActivity.ChoosingBeatmap());
AddStep("editing beatmap", () => activity.Value = new UserActivity.EditingBeatmap(null));
AddStep("modding beatmap", () => activity.Value = new UserActivity.ModdingBeatmap());
AddStep("testing beatmap", () => activity.Value = new UserActivity.TestingBeatmap(null, null));
}
[Test]

View File

@ -7,6 +7,7 @@
using osu.Game.Beatmaps;
using osu.Game.Overlays;
using osu.Game.Screens.Play;
using osu.Game.Users;
namespace osu.Game.Screens.Edit.GameplayTest
{
@ -15,6 +16,8 @@ public partial class EditorPlayer : Player
private readonly Editor editor;
private readonly EditorState editorState;
protected override UserActivity InitialActivity => new UserActivity.TestingBeatmap(Beatmap.Value.BeatmapInfo, Ruleset.Value);
[Resolved]
private MusicController musicController { get; set; } = null!;

View File

@ -80,6 +80,16 @@ public InSoloGame(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)
}
}
public class TestingBeatmap : InGame
{
public override string GetStatus(bool hideIdentifiableInformation = false) => "Testing a beatmap";
public TestingBeatmap(IBeatmapInfo beatmapInfo, IRulesetInfo ruleset)
: base(beatmapInfo, ruleset)
{
}
}
public class EditingBeatmap : UserActivity
{
public IBeatmapInfo BeatmapInfo { get; }