mirror of
https://github.com/ppy/osu
synced 2025-02-13 16:47:38 +00:00
Initial commit
This commit is contained in:
parent
d5ae8f5ef4
commit
a86c7f478c
@ -91,7 +91,7 @@ namespace osu.Game
|
|||||||
|
|
||||||
protected BackButton BackButton;
|
protected BackButton BackButton;
|
||||||
|
|
||||||
protected SettingsPanel Settings;
|
protected SettingsOverlay Settings;
|
||||||
|
|
||||||
private VolumeOverlay volume;
|
private VolumeOverlay volume;
|
||||||
private OsuLogo osuLogo;
|
private OsuLogo osuLogo;
|
||||||
@ -767,11 +767,17 @@ namespace osu.Game
|
|||||||
|
|
||||||
private Task asyncLoadStream;
|
private Task asyncLoadStream;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Schedules loading the provided <paramref name="d"/> in a single file.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="d">The component to load.</param>
|
||||||
|
/// <param name="add">The method to invoke for adding the component.</param>
|
||||||
|
/// <param name="cache">Whether to cache the component as type <typeparamref name="T"/> into the game dependencies before any scheduling.</param>
|
||||||
private T loadComponentSingleFile<T>(T d, Action<T> add, bool cache = false)
|
private T loadComponentSingleFile<T>(T d, Action<T> add, bool cache = false)
|
||||||
where T : Drawable
|
where T : Drawable
|
||||||
{
|
{
|
||||||
if (cache)
|
if (cache)
|
||||||
dependencies.Cache(d);
|
dependencies.CacheAs(d);
|
||||||
|
|
||||||
if (d is OverlayContainer overlay)
|
if (d is OverlayContainer overlay)
|
||||||
overlays.Add(overlay);
|
overlays.Add(overlay);
|
||||||
|
Loading…
Reference in New Issue
Block a user