diff --git a/osu.Game/Skinning/SkinnableDrawable.cs b/osu.Game/Skinning/SkinnableDrawable.cs index 0a7c398990..995cb15136 100644 --- a/osu.Game/Skinning/SkinnableDrawable.cs +++ b/osu.Game/Skinning/SkinnableDrawable.cs @@ -27,10 +27,6 @@ namespace osu.Game.Skinning /// protected Drawable Drawable { get; private set; } - protected virtual T CreateDefault(string name) => createDefault(name); - - private readonly Func createDefault; - private readonly string componentName; private readonly bool restrictSize; @@ -57,6 +53,10 @@ namespace osu.Game.Skinning RelativeSizeAxes = Axes.Both; } + private readonly Func createDefault; + + protected virtual T CreateDefault(string name) => createDefault(name); + /// /// Whether to apply size restrictions (specified via ) to the default implementation. /// diff --git a/osu.Game/Skinning/SkinnableSprite.cs b/osu.Game/Skinning/SkinnableSprite.cs index 9771f4cc19..ceb1ed0f70 100644 --- a/osu.Game/Skinning/SkinnableSprite.cs +++ b/osu.Game/Skinning/SkinnableSprite.cs @@ -15,8 +15,6 @@ namespace osu.Game.Skinning { protected override bool ApplySizeRestrictionsToDefault => true; - protected override Sprite CreateDefault(string name) => new Sprite { Texture = textures.Get(name) }; - [Resolved] private TextureStore textures { get; set; } @@ -24,5 +22,7 @@ namespace osu.Game.Skinning : base(name, allowFallback, restrictSize) { } + + protected override Sprite CreateDefault(string name) => new Sprite { Texture = textures.Get(name) }; } }