1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Unload daily challenge background less aggressively

This commit is contained in:
Dean Herbert 2024-05-23 14:12:27 +08:00
parent 6c37560842
commit f85a1339d9
No known key found for this signature in database
2 changed files with 12 additions and 7 deletions

View File

@ -27,8 +27,17 @@ namespace osu.Game.Beatmaps.Drawables
set => base.Masking = value; 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; this.coverType = coverType;
InternalChild = new Box 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) protected override DelayedLoadWrapper CreateDelayedLoadWrapper(Func<Drawable> createContentFunc, double timeBeforeLoad)
=> new DelayedLoadUnloadWrapper(createContentFunc, timeBeforeLoad) => new DelayedLoadUnloadWrapper(createContentFunc, timeBeforeLoad, timeBeforeUnload)
{ {
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
Origin = Anchor.Centre, Origin = Anchor.Centre,

View File

@ -67,7 +67,7 @@ namespace osu.Game.Screens.Menu
{ {
Children = new Drawable[] Children = new Drawable[]
{ {
cover = new UpdateableOnlineBeatmapSetCover cover = new UpdateableOnlineBeatmapSetCover(timeBeforeLoad: 0, timeBeforeUnload: 600_000)
{ {
RelativeSizeAxes = Axes.Y, RelativeSizeAxes = Axes.Y,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,