Move ScrollAlgorithm inside IScrollingInfo

This commit is contained in:
smoogipoo
2018-11-07 16:51:28 +09:00
parent 54668a0dec
commit e7969ecec7
5 changed files with 30 additions and 31 deletions

View File

@ -18,16 +18,13 @@ namespace osu.Game.Tests.Visual
/// </summary>
public class ScrollingTestContainer : Container
{
public SortedList<MultiplierControlPoint> ControlPoints => scrollAlgorithm.ControlPoints;
public SortedList<MultiplierControlPoint> ControlPoints => scrollingInfo.Algorithm.ControlPoints;
public ScrollAlgorithm ScrollAlgorithm { set => scrollAlgorithm.Algorithm = value; }
public ScrollAlgorithm ScrollAlgorithm { set => scrollingInfo.Algorithm.Algorithm = value; }
[Cached(Type = typeof(IScrollingInfo))]
private readonly TestScrollingInfo scrollingInfo = new TestScrollingInfo();
[Cached(Type = typeof(IScrollAlgorithm))]
private readonly TestScrollAlgorithm scrollAlgorithm = new TestScrollAlgorithm();
public ScrollingTestContainer(ScrollingDirection direction)
{
scrollingInfo.Direction.Value = direction;
@ -39,6 +36,9 @@ namespace osu.Game.Tests.Visual
{
public readonly Bindable<ScrollingDirection> Direction = new Bindable<ScrollingDirection>();
IBindable<ScrollingDirection> IScrollingInfo.Direction => Direction;
public readonly TestScrollAlgorithm Algorithm = new TestScrollAlgorithm();
IScrollAlgorithm IScrollingInfo.Algorithm => Algorithm;
}
private class TestScrollAlgorithm : IScrollAlgorithm