mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 12:02:55 +08:00
Move fade start out of loop
This commit is contained in:
parent
cd37ebdff2
commit
cf81467e13
@ -58,12 +58,13 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
{
|
||||
base.Update();
|
||||
|
||||
var fadeStart = scrollContainer.DrawHeight - 10;
|
||||
fadeStart += scrollContainer.IsScrolledToEnd() ? 70 : 0;
|
||||
|
||||
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)));
|
||||
|
Loading…
Reference in New Issue
Block a user