Added switching between grid/list and little transitions for the panels

This commit is contained in:
DrabWeb
2017-05-19 17:52:34 -03:00
parent 1d61fc84c7
commit 05b8fc5126
4 changed files with 116 additions and 15 deletions

View File

@ -22,11 +22,14 @@ namespace osu.Game.Overlays.Direct
private readonly float horizontal_padding = 10;
private readonly float vertical_padding = 5;
private FillFlowContainer bottomPanel;
public DirectGridPanel(BeatmapSetInfo beatmap) : base(beatmap)
{
Height = 140 + vertical_padding; //full height of all the elements plus vertical padding (autosize uses the image)
CornerRadius = 4;
Masking = true;
EdgeEffect = new EdgeEffect
{
Type = EdgeEffectType.Shadow,
@ -36,6 +39,16 @@ namespace osu.Game.Overlays.Direct
};
}
protected override void LoadComplete()
{
base.LoadComplete();
FadeInFromZero(200, EasingTypes.Out);
bottomPanel.LayoutDuration = 200;
bottomPanel.LayoutEasing = EasingTypes.Out;
bottomPanel.Origin = Anchor.BottomLeft;
}
[BackgroundDependencyLoader]
private void load(OsuColour colours, LocalisationEngine localisation, TextureStore textures)
{
@ -52,10 +65,10 @@ namespace osu.Game.Overlays.Direct
RelativeSizeAxes = Axes.Both,
Colour = Color4.Black.Opacity(0.5f),
},
new FillFlowContainer
bottomPanel = new FillFlowContainer
{
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft,
Origin = Anchor.TopLeft,
Direction = FillDirection.Vertical,
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,