mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 09:12:54 +08:00
Merge pull request #3957 from peppy/fix-excessive-cover-loading
Fix covers being loaded even when off-screen
This commit is contained in:
commit
e6ccf209c7
@ -25,6 +25,7 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
|
|
||||||
protected override Drawable CreateDrawable(BeatmapInfo model)
|
protected override Drawable CreateDrawable(BeatmapInfo model)
|
||||||
{
|
{
|
||||||
|
return new DelayedLoadUnloadWrapper(() => {
|
||||||
Drawable drawable;
|
Drawable drawable;
|
||||||
|
|
||||||
var localBeatmap = beatmaps.GetWorkingBeatmap(model);
|
var localBeatmap = beatmaps.GetWorkingBeatmap(model);
|
||||||
@ -38,10 +39,12 @@ namespace osu.Game.Beatmaps.Drawables
|
|||||||
drawable.Anchor = Anchor.Centre;
|
drawable.Anchor = Anchor.Centre;
|
||||||
drawable.Origin = Anchor.Centre;
|
drawable.Origin = Anchor.Centre;
|
||||||
drawable.FillMode = FillMode.Fill;
|
drawable.FillMode = FillMode.Fill;
|
||||||
|
drawable.OnLoadComplete = d => d.FadeInFromZero(400);
|
||||||
|
|
||||||
return drawable;
|
return drawable;
|
||||||
|
}, 500, 10000);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override double FadeDuration => 400;
|
protected override double FadeDuration => 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user