Don't derive ScrollContainer unnecessarily.

This commit is contained in:
Dean Herbert 2016-11-09 12:10:22 +09:00
parent d70e8806b4
commit d41d7b8e9a

View File

@ -59,8 +59,9 @@ namespace osu.Game.Overlays
Colour = Color4.Black, Colour = Color4.Black,
Alpha = 0.6f, Alpha = 0.6f,
}, },
scrollContainer = new PaddedScrollContainer scrollContainer = new ScrollContainer
{ {
ScrollbarOverlapsContent = false,
ScrollDraggerAnchor = Anchor.TopLeft, ScrollDraggerAnchor = Anchor.TopLeft,
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Width = width, Width = width,
@ -139,13 +140,5 @@ namespace osu.Game.Overlays
sidebar.MoveToX(-sidebar_width, 600, EasingTypes.OutQuint); sidebar.MoveToX(-sidebar_width, 600, EasingTypes.OutQuint);
FadeTo(0, 300); FadeTo(0, 300);
} }
private class PaddedScrollContainer : ScrollContainer
{
public PaddedScrollContainer()
{
Content.Padding = new MarginPadding { Left = sidebar_padding };
}
}
} }
} }