This commit is contained in:
DrabWeb 2017-03-15 13:57:41 -03:00
parent efd617dd34
commit cd37ebdff2

View File

@ -3,7 +3,10 @@
using System.Collections.Generic;
using OpenTK;
using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives;
using osu.Game.Modes;
@ -51,6 +54,22 @@ namespace osu.Game.Screens.Select.Leaderboards
}
}
protected override void Update()
{
base.Update();
foreach (var s in scrollFlow.Children)
{
var topY = scrollContainer.ScrollContent.DrawPosition.Y + s.DrawPosition.Y;
var bottomY = topY + 70;
var fadeStart = scrollContainer.DrawHeight - 10;
fadeStart += scrollContainer.IsScrolledToEnd() ? 70 : 0;
s.ColourInfo = ColourInfo.GradientVertical(Color4.White.Opacity(System.Math.Min((fadeStart - topY) / 70, 1)),
Color4.White.Opacity(System.Math.Min((fadeStart - bottomY) / 70, 1)));
}
}
public Leaderboard()
{
Children = new Drawable[]