2023-06-23 00:37:25 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
2020-09-07 17:47:14 +08:00
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
using osu.Framework.Allocation;
|
2021-08-29 01:09:35 +08:00
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2021-11-12 03:42:33 +08:00
|
|
|
|
using osu.Game.Overlays;
|
2021-09-05 12:40:58 +08:00
|
|
|
|
using osu.Game.Rulesets;
|
|
|
|
|
using osu.Game.Rulesets.Catch;
|
2020-09-07 17:47:14 +08:00
|
|
|
|
using osu.Game.Rulesets.Edit;
|
2021-09-05 12:40:58 +08:00
|
|
|
|
using osu.Game.Rulesets.Mania;
|
|
|
|
|
using osu.Game.Rulesets.Osu;
|
2020-09-07 17:47:14 +08:00
|
|
|
|
using osu.Game.Rulesets.Osu.Beatmaps;
|
2021-09-05 12:40:58 +08:00
|
|
|
|
using osu.Game.Rulesets.Taiko;
|
2020-09-07 17:47:14 +08:00
|
|
|
|
using osu.Game.Screens.Edit;
|
|
|
|
|
using osu.Game.Screens.Edit.Setup;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Tests.Visual.Editing
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class TestSceneSetupScreen : EditorClockTestScene
|
2020-09-07 17:47:14 +08:00
|
|
|
|
{
|
|
|
|
|
[Cached(typeof(EditorBeatmap))]
|
|
|
|
|
[Cached(typeof(IBeatSnapProvider))]
|
|
|
|
|
private readonly EditorBeatmap editorBeatmap;
|
|
|
|
|
|
2021-11-12 03:42:33 +08:00
|
|
|
|
[Cached]
|
|
|
|
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
|
|
|
|
|
2020-09-07 17:47:14 +08:00
|
|
|
|
public TestSceneSetupScreen()
|
|
|
|
|
{
|
2022-01-12 22:17:35 +08:00
|
|
|
|
editorBeatmap = new EditorBeatmap(new OsuBeatmap
|
|
|
|
|
{
|
|
|
|
|
BeatmapInfo =
|
|
|
|
|
{
|
|
|
|
|
Ruleset = new OsuRuleset().RulesetInfo
|
|
|
|
|
}
|
|
|
|
|
});
|
2020-09-07 17:47:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-09-05 12:40:58 +08:00
|
|
|
|
[Test]
|
|
|
|
|
public void TestOsu() => runForRuleset(new OsuRuleset().RulesetInfo);
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestTaiko() => runForRuleset(new TaikoRuleset().RulesetInfo);
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestCatch() => runForRuleset(new CatchRuleset().RulesetInfo);
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void TestMania() => runForRuleset(new ManiaRuleset().RulesetInfo);
|
2021-08-29 01:09:35 +08:00
|
|
|
|
|
2021-09-05 12:40:58 +08:00
|
|
|
|
private void runForRuleset(RulesetInfo rulesetInfo)
|
|
|
|
|
{
|
|
|
|
|
AddStep("create screen", () =>
|
2021-08-29 01:09:35 +08:00
|
|
|
|
{
|
2021-09-05 12:40:58 +08:00
|
|
|
|
editorBeatmap.BeatmapInfo.Ruleset = rulesetInfo;
|
|
|
|
|
|
|
|
|
|
Beatmap.Value = CreateWorkingBeatmap(editorBeatmap.PlayableBeatmap);
|
|
|
|
|
|
|
|
|
|
Child = new SetupScreen
|
|
|
|
|
{
|
|
|
|
|
State = { Value = Visibility.Visible },
|
|
|
|
|
};
|
|
|
|
|
});
|
2020-09-07 17:47:14 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|