osu/osu.Game.Rulesets.Mania.Tests/Editor/ManiaSelectionBlueprintTest...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

57 lines
1.9 KiB
C#
Raw Normal View History

// 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
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;
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;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;
2018-11-13 07:42:40 +00:00
using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Mania.Tests.Editor
2018-11-13 07:42:40 +00:00
{
public abstract partial class ManiaSelectionBlueprintTestScene : SelectionBlueprintTestScene
2018-11-13 07:42:40 +00:00
{
protected override Container<Drawable> Content => blueprints ?? base.Content;
private readonly Container blueprints;
[Cached(typeof(Playfield))]
public Playfield Playfield { get; }
private readonly ScrollingTestContainer scrollingTestContainer;
protected ScrollingDirection Direction
{
set => scrollingTestContainer.Direction = value;
}
2018-11-15 12:37:22 +00:00
protected ManiaSelectionBlueprintTestScene(int columns)
2018-11-15 12:37:22 +00:00
{
var stageDefinitions = new List<StageDefinition> { new StageDefinition(columns) };
base.Content.Child = scrollingTestContainer = new ScrollingTestContainer(ScrollingDirection.Up)
2018-11-15 12:37:22 +00:00
{
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
Playfield = new ManiaPlayfield(stageDefinitions)
{
RelativeSizeAxes = Axes.Both,
},
blueprints = new Container
{
RelativeSizeAxes = Axes.Both
}
}
};
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
}
}