1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:07:52 +08:00
osu-lazer/osu.Game.Rulesets.Mania.Tests/TestCaseStage.cs

55 lines
1.7 KiB
C#
Raw Normal View History

2018-06-08 13:28:27 +08:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Rulesets.Mania.Beatmaps;
using osu.Game.Rulesets.Mania.UI;
using osu.Game.Rulesets.UI.Scrolling;
using OpenTK;
namespace osu.Game.Rulesets.Mania.Tests
{
[TestFixture]
public class TestCaseStage : ManiaInputTestCase
{
public TestCaseStage()
: base(4)
{
}
[BackgroundDependencyLoader]
private void load()
{
Child = new FillFlowContainer
{
RelativeSizeAxes = Axes.Both,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Spacing = new Vector2(20, 0),
Children = new[]
{
createStage(ScrollingDirection.Up, ManiaAction.Key1),
createStage(ScrollingDirection.Down, ManiaAction.Key3)
}
};
}
private Drawable createStage(ScrollingDirection direction, ManiaAction action)
2018-06-08 13:28:27 +08:00
{
var specialAction = ManiaAction.Special1;
return new ScrollingTestContainer(new ScrollingInfo(direction))
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativeSizeAxes = Axes.Y,
AutoSizeAxes = Axes.X,
Child = new ManiaStage(direction, 0, new StageDefinition { Columns = 2 }, ref action, ref specialAction)
};
2018-06-08 13:28:27 +08:00
}
}
}