2018-07-17 15:55:50 +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 osu.Framework.Configuration;
|
|
|
|
using osu.Game.Rulesets.Mania.Configuration;
|
|
|
|
using osu.Game.Rulesets.UI.Scrolling;
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Mania.UI
|
|
|
|
{
|
|
|
|
public class ManiaScrollingInfo : IScrollingInfo
|
|
|
|
{
|
|
|
|
private readonly Bindable<ManiaScrollingDirection> configDirection = new Bindable<ManiaScrollingDirection>();
|
|
|
|
|
|
|
|
public readonly Bindable<ScrollingDirection> Direction = new Bindable<ScrollingDirection>();
|
|
|
|
IBindable<ScrollingDirection> IScrollingInfo.Direction => Direction;
|
|
|
|
|
|
|
|
public ManiaScrollingInfo(ManiaConfigManager config)
|
|
|
|
{
|
|
|
|
config.BindWith(ManiaSetting.ScrollDirection, configDirection);
|
2018-08-07 11:20:24 +08:00
|
|
|
configDirection.BindValueChanged(v => Direction.Value = (ScrollingDirection)v, true);
|
2018-07-17 15:55:50 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|