mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 16:13:34 +08:00
Unload daily challenge background less aggressively
This commit is contained in:
parent
6c37560842
commit
f85a1339d9
@ -27,8 +27,17 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
set => base.Masking = value;
|
||||
}
|
||||
|
||||
public UpdateableOnlineBeatmapSetCover(BeatmapSetCoverType coverType = BeatmapSetCoverType.Cover)
|
||||
protected override double LoadDelay { get; }
|
||||
|
||||
private readonly double timeBeforeUnload;
|
||||
|
||||
protected override double TransformDuration => 400;
|
||||
|
||||
public UpdateableOnlineBeatmapSetCover(BeatmapSetCoverType coverType = BeatmapSetCoverType.Cover, double timeBeforeLoad = 500, double timeBeforeUnload = 1000)
|
||||
{
|
||||
LoadDelay = timeBeforeLoad;
|
||||
this.timeBeforeUnload = timeBeforeUnload;
|
||||
|
||||
this.coverType = coverType;
|
||||
|
||||
InternalChild = new Box
|
||||
@ -38,12 +47,8 @@ namespace osu.Game.Beatmaps.Drawables
|
||||
};
|
||||
}
|
||||
|
||||
protected override double LoadDelay => 500;
|
||||
|
||||
protected override double TransformDuration => 400;
|
||||
|
||||
protected override DelayedLoadWrapper CreateDelayedLoadWrapper(Func<Drawable> createContentFunc, double timeBeforeLoad)
|
||||
=> new DelayedLoadUnloadWrapper(createContentFunc, timeBeforeLoad)
|
||||
=> new DelayedLoadUnloadWrapper(createContentFunc, timeBeforeLoad, timeBeforeUnload)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
cover = new UpdateableOnlineBeatmapSetCover
|
||||
cover = new UpdateableOnlineBeatmapSetCover(timeBeforeLoad: 0, timeBeforeUnload: 600_000)
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
Anchor = Anchor.Centre,
|
||||
|
Loading…
Reference in New Issue
Block a user