1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 23:07:44 +08:00
osu-lazer/osu.Game.Rulesets.Mania.Tests/Editor/ManiaSelectionBlueprintTestScene.cs

55 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 15:42:40 +08:00
using System.Collections.Generic;
2018-11-13 15:42:40 +08:00
using osu.Framework.Allocation;
2018-11-15 20:37:22 +08:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Mania.Beatmaps;
2018-11-15 20:37:22 +08:00
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.UI;
using osu.Game.Rulesets.UI.Scrolling;
2018-11-13 15:42:40 +08:00
using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Mania.Tests.Editor
2018-11-13 15:42:40 +08:00
{
public abstract class ManiaSelectionBlueprintTestScene : SelectionBlueprintTestScene
2018-11-13 15:42:40 +08: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 20:37:22 +08:00
protected ManiaSelectionBlueprintTestScene(int columns)
2018-11-15 20:37:22 +08:00
{
var stageDefinitions = new List<StageDefinition> { new StageDefinition { Columns = columns } };
base.Content.Child = scrollingTestContainer = new ScrollingTestContainer(ScrollingDirection.Up)
2018-11-15 20:37:22 +08: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 20:37:22 +08:00
}
2018-11-13 15:42:40 +08:00
}
}