2019-01-24 08:43:03 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-11-13 07:42:40 +00:00
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
#nullable disable
|
|
|
|
|
2021-06-15 06:14:14 +00:00
|
|
|
using System.Collections.Generic;
|
2018-11-13 07:42:40 +00:00
|
|
|
using osu.Framework.Allocation;
|
2018-11-15 12:37:22 +00:00
|
|
|
using osu.Framework.Graphics;
|
2021-06-15 06:14:14 +00:00
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
using osu.Game.Rulesets.Mania.Beatmaps;
|
2018-11-15 12:37:22 +00:00
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
2021-06-15 06:14:14 +00:00
|
|
|
using osu.Game.Rulesets.UI;
|
|
|
|
using osu.Game.Rulesets.UI.Scrolling;
|
2018-11-13 07:42:40 +00:00
|
|
|
using osu.Game.Tests.Visual;
|
|
|
|
|
2020-09-25 09:48:04 +00:00
|
|
|
namespace osu.Game.Rulesets.Mania.Tests.Editor
|
2018-11-13 07:42:40 +00:00
|
|
|
{
|
2021-06-17 01:07:52 +00:00
|
|
|
public abstract partial class ManiaSelectionBlueprintTestScene : SelectionBlueprintTestScene
|
2018-11-13 07:42:40 +00:00
|
|
|
{
|
2021-06-15 06:14:14 +00:00
|
|
|
protected override Container<Drawable> Content => blueprints ?? base.Content;
|
|
|
|
|
|
|
|
private readonly Container blueprints;
|
|
|
|
|
2021-06-17 01:07:52 +00:00
|
|
|
[Cached(typeof(Playfield))]
|
2021-06-15 06:14:14 +00:00
|
|
|
public Playfield Playfield { get; }
|
|
|
|
|
|
|
|
private readonly ScrollingTestContainer scrollingTestContainer;
|
|
|
|
|
|
|
|
protected ScrollingDirection Direction
|
|
|
|
{
|
|
|
|
set => scrollingTestContainer.Direction = value;
|
|
|
|
}
|
2018-11-15 12:37:22 +00:00
|
|
|
|
2021-06-15 06:22:36 +00:00
|
|
|
protected ManiaSelectionBlueprintTestScene(int columns)
|
2018-11-15 12:37:22 +00:00
|
|
|
{
|
2022-10-05 10:14:31 +00:00
|
|
|
var stageDefinitions = new List<StageDefinition> { new StageDefinition(columns) };
|
2021-06-15 06:22:36 +00:00
|
|
|
base.Content.Child = scrollingTestContainer = new ScrollingTestContainer(ScrollingDirection.Up)
|
2018-11-15 12:37:22 +00:00
|
|
|
{
|
2021-06-15 06:14:14 +00:00
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
Children = new Drawable[]
|
|
|
|
{
|
|
|
|
Playfield = new ManiaPlayfield(stageDefinitions)
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
},
|
|
|
|
blueprints = new Container
|
|
|
|
{
|
|
|
|
RelativeSizeAxes = Axes.Both
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2021-06-15 06:22:36 +00:00
|
|
|
|
|
|
|
AddToggleStep("Downward scroll", b => Direction = b ? ScrollingDirection.Down : ScrollingDirection.Up);
|
2018-11-15 12:37:22 +00:00
|
|
|
}
|
2018-11-13 07:42:40 +00:00
|
|
|
}
|
|
|
|
}
|