mirror of
https://github.com/ppy/osu.git
synced 2024-12-30 10:02:54 +08:00
37 lines
1.2 KiB
C#
37 lines
1.2 KiB
C#
// 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.
|
|
|
|
#nullable disable
|
|
|
|
using NUnit.Framework;
|
|
using osu.Framework.Allocation;
|
|
using osu.Framework.Bindables;
|
|
using osu.Framework.Extensions.ObjectExtensions;
|
|
using osu.Game.Rulesets.Mania.Configuration;
|
|
using osu.Game.Rulesets.Mania.UI;
|
|
using osu.Game.Tests.Visual;
|
|
|
|
namespace osu.Game.Rulesets.Mania.Tests.Editor
|
|
{
|
|
[TestFixture]
|
|
public partial class TestSceneEditor : EditorTestScene
|
|
{
|
|
private readonly Bindable<ManiaScrollingDirection> direction = new Bindable<ManiaScrollingDirection>();
|
|
|
|
protected override Ruleset CreateEditorRuleset() => new ManiaRuleset();
|
|
|
|
public TestSceneEditor()
|
|
{
|
|
AddStep("upwards scroll", () => direction.Value = ManiaScrollingDirection.Up);
|
|
AddStep("downwards scroll", () => direction.Value = ManiaScrollingDirection.Down);
|
|
}
|
|
|
|
[BackgroundDependencyLoader]
|
|
private void load()
|
|
{
|
|
var config = (ManiaRulesetConfigManager)RulesetConfigs.GetConfigFor(Ruleset.Value.CreateInstance()).AsNonNull();
|
|
config.BindWith(ManiaRulesetSetting.ScrollDirection, direction);
|
|
}
|
|
}
|
|
}
|