2019-01-24 16:43:03 +08: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-06-07 15:08:37 +08:00
|
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
2018-07-19 18:30:20 +08:00
|
|
|
|
using osu.Framework.Allocation;
|
2019-02-21 18:04:31 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
2018-07-19 18:30:20 +08:00
|
|
|
|
using osu.Game.Rulesets.Mania.Configuration;
|
|
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
2018-06-07 15:08:37 +08:00
|
|
|
|
using osu.Game.Tests.Visual;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.Tests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class TestCaseEditor : EditorTestCase
|
|
|
|
|
{
|
2018-07-19 18:30:20 +08:00
|
|
|
|
private readonly Bindable<ManiaScrollingDirection> direction = new Bindable<ManiaScrollingDirection>();
|
|
|
|
|
|
2018-06-07 15:08:37 +08:00
|
|
|
|
public TestCaseEditor()
|
|
|
|
|
: base(new ManiaRuleset())
|
|
|
|
|
{
|
2018-07-19 18:30:20 +08:00
|
|
|
|
AddStep("upwards scroll", () => direction.Value = ManiaScrollingDirection.Up);
|
|
|
|
|
AddStep("downwards scroll", () => direction.Value = ManiaScrollingDirection.Down);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
|
|
|
|
private void load(RulesetConfigCache configCache)
|
|
|
|
|
{
|
2019-01-25 18:14:37 +08:00
|
|
|
|
var config = (ManiaRulesetConfigManager)configCache.GetConfigFor(Ruleset.Value.CreateInstance());
|
|
|
|
|
config.BindWith(ManiaRulesetSetting.ScrollDirection, direction);
|
2018-06-07 15:08:37 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|