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:
commit
13fe0d3491
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user