1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Merge pull request #21278 from peppy/overlay-header-texture-reduction

Avoid loading overlay headers until first open
This commit is contained in:
Dan Balasescu 2022-11-18 11:53:46 +09:00 committed by GitHub
commit 13fe0d3491
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ namespace osu.Game.Overlays
Height = 80;
RelativeSizeAxes = Axes.X;
Masking = true;
InternalChild = new Background(textureName);
InternalChild = new DelayedLoadWrapper(() => new Background(textureName));
}
private class Background : Sprite
@ -36,10 +36,16 @@ namespace osu.Game.Overlays
}
[BackgroundDependencyLoader]
private void load(TextureStore textures)
private void load(LargeTextureStore textures)
{
Texture = textures.Get(textureName);
}
protected override void LoadComplete()
{
base.LoadComplete();
this.FadeInFromZero(500, Easing.OutQuint);
}
}
}
}