diff --git a/osu.Game/Skinning/SkinManager.cs b/osu.Game/Skinning/SkinManager.cs
index 89f166dc2a..ffdbadf54c 100644
--- a/osu.Game/Skinning/SkinManager.cs
+++ b/osu.Game/Skinning/SkinManager.cs
@@ -48,19 +48,15 @@ namespace osu.Game.Skinning
protected override string ImportFromStablePath => "Skins";
- private readonly Skin defaultSkin;
-
///
/// An providing the resources of the default skin.
///
- public ISkin DefaultSkin => defaultSkin;
-
- private readonly Skin defaultLegacySkin;
+ public Skin DefaultSkin { get; }
///
/// An providing the resources of the default legacy skin.
///
- public ISkin DefaultLegacySkin => defaultLegacySkin;
+ public Skin DefaultLegacySkin { get; }
public SkinManager(Storage storage, DatabaseContextFactory contextFactory, GameHost host, IResourceStore resources, AudioManager audio)
: base(storage, contextFactory, new SkinStore(contextFactory, storage), host)
@@ -69,12 +65,12 @@ namespace osu.Game.Skinning
this.host = host;
this.resources = resources;
- defaultLegacySkin = new DefaultLegacySkin(this);
- defaultSkin = new DefaultSkin(this);
+ DefaultLegacySkin = new DefaultLegacySkin(this);
+ DefaultSkin = new DefaultSkin(this);
CurrentSkinInfo.ValueChanged += skin => CurrentSkin.Value = GetSkin(skin.NewValue);
- CurrentSkin.Value = defaultSkin;
+ CurrentSkin.Value = DefaultSkin;
CurrentSkin.ValueChanged += skin =>
{
if (skin.NewValue.SkinInfo != CurrentSkinInfo.Value)
@@ -93,8 +89,8 @@ namespace osu.Game.Skinning
public List GetAllUsableSkins()
{
var userSkins = GetAllUserSkins();
- userSkins.Insert(0, SkinInfo.Default);
- userSkins.Insert(1, Skinning.DefaultLegacySkin.Info);
+ userSkins.Insert(0, DefaultSkin.SkinInfo);
+ userSkins.Insert(1, DefaultLegacySkin.SkinInfo);
return userSkins;
}
@@ -236,11 +232,11 @@ namespace osu.Game.Skinning
if (lookupFunction(CurrentSkin.Value))
return CurrentSkin.Value;
- if (CurrentSkin.Value is LegacySkin && lookupFunction(defaultLegacySkin))
- return defaultLegacySkin;
+ if (CurrentSkin.Value is LegacySkin && lookupFunction(DefaultLegacySkin))
+ return DefaultLegacySkin;
- if (lookupFunction(defaultSkin))
- return defaultSkin;
+ if (lookupFunction(DefaultSkin))
+ return DefaultSkin;
return null;
}
@@ -254,11 +250,11 @@ namespace osu.Game.Skinning
// TODO: we also want to return a DefaultLegacySkin here if the current *beatmap* is providing any skinned elements.
// When attempting to address this, we may want to move the full DefaultLegacySkin fallback logic to within Player itself (to better allow
// for beatmap skin visibility).
- if (CurrentSkin.Value is LegacySkin && lookupFunction(defaultLegacySkin) is T legacySourced)
+ if (CurrentSkin.Value is LegacySkin && lookupFunction(DefaultLegacySkin) is T legacySourced)
return legacySourced;
// Finally fall back to the (non-legacy) default.
- return lookupFunction(defaultSkin);
+ return lookupFunction(DefaultSkin);
}
#region IResourceStorageProvider