mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 21:52:55 +08:00
Initial commit
This commit is contained in:
parent
d5ae8f5ef4
commit
a86c7f478c
@ -91,7 +91,7 @@ namespace osu.Game
|
||||
|
||||
protected BackButton BackButton;
|
||||
|
||||
protected SettingsPanel Settings;
|
||||
protected SettingsOverlay Settings;
|
||||
|
||||
private VolumeOverlay volume;
|
||||
private OsuLogo osuLogo;
|
||||
@ -767,11 +767,17 @@ namespace osu.Game
|
||||
|
||||
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)
|
||||
where T : Drawable
|
||||
{
|
||||
if (cache)
|
||||
dependencies.Cache(d);
|
||||
dependencies.CacheAs(d);
|
||||
|
||||
if (d is OverlayContainer overlay)
|
||||
overlays.Add(overlay);
|
||||
|
Loading…
Reference in New Issue
Block a user