2019-01-24 17:43:03 +09: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 16:08:37 +09:00
|
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
2018-07-19 19:30:20 +09:00
|
|
|
|
using osu.Framework.Allocation;
|
2019-02-21 19:04:31 +09:00
|
|
|
|
using osu.Framework.Bindables;
|
2021-12-23 19:02:10 +01:00
|
|
|
|
using osu.Framework.Extensions.ObjectExtensions;
|
2018-07-19 19:30:20 +09:00
|
|
|
|
using osu.Game.Rulesets.Mania.Configuration;
|
|
|
|
|
using osu.Game.Rulesets.Mania.UI;
|
2018-06-07 16:08:37 +09:00
|
|
|
|
using osu.Game.Tests.Visual;
|
|
|
|
|
|
2020-09-25 18:48:04 +09:00
|
|
|
|
namespace osu.Game.Rulesets.Mania.Tests.Editor
|
2018-06-07 16:08:37 +09:00
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
2022-11-24 14:32:20 +09:00
|
|
|
|
public partial class TestSceneEditor : EditorTestScene
|
2018-06-07 16:08:37 +09:00
|
|
|
|
{
|
2018-07-19 19:30:20 +09:00
|
|
|
|
private readonly Bindable<ManiaScrollingDirection> direction = new Bindable<ManiaScrollingDirection>();
|
|
|
|
|
|
2020-06-04 00:47:10 +03:00
|
|
|
|
protected override Ruleset CreateEditorRuleset() => new ManiaRuleset();
|
|
|
|
|
|
2019-05-14 22:37:25 +03:00
|
|
|
|
public TestSceneEditor()
|
2018-06-07 16:08:37 +09:00
|
|
|
|
{
|
2018-07-19 19:30:20 +09:00
|
|
|
|
AddStep("upwards scroll", () => direction.Value = ManiaScrollingDirection.Up);
|
|
|
|
|
AddStep("downwards scroll", () => direction.Value = ManiaScrollingDirection.Down);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[BackgroundDependencyLoader]
|
2021-12-23 19:34:41 +01:00
|
|
|
|
private void load()
|
2018-07-19 19:30:20 +09:00
|
|
|
|
{
|
2021-12-23 19:34:41 +01:00
|
|
|
|
var config = (ManiaRulesetConfigManager)RulesetConfigs.GetConfigFor(Ruleset.Value.CreateInstance()).AsNonNull();
|
2019-01-25 11:14:37 +01:00
|
|
|
|
config.BindWith(ManiaRulesetSetting.ScrollDirection, direction);
|
2018-06-07 16:08:37 +09:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|