diff --git a/osu.Game/Skinning/SkinnableDrawable.cs b/osu.Game/Skinning/SkinnableDrawable.cs index a5f22f60a2..81abc9e80c 100644 --- a/osu.Game/Skinning/SkinnableDrawable.cs +++ b/osu.Game/Skinning/SkinnableDrawable.cs @@ -22,16 +22,20 @@ namespace osu.Game.Skinning private readonly string componentName; - /// - /// Whether a user-skin drawable should be limited to the size of our parent. - /// - public readonly bool RestrictSize; + private readonly bool restrictSize; + /// + /// + /// + /// The namespace-complete resource name for this skinnable element. + /// A function to create the default skin implementation of this element. + /// Whther to fallback to the default implementation when a custom skin is specified but not implementation is present. + /// Whether a user-skin drawable should be limited to the size of our parent. public SkinnableDrawable(string name, Func defaultImplementation, bool fallback = true, bool restrictSize = true) : base(fallback) { componentName = name; createDefault = defaultImplementation; - RestrictSize = restrictSize; + this.restrictSize = restrictSize; RelativeSizeAxes = Axes.Both; } @@ -41,7 +45,7 @@ namespace osu.Game.Skinning var drawable = skin.GetDrawableComponent(componentName); if (drawable != null) { - if (RestrictSize) + if (restrictSize) { drawable.RelativeSizeAxes = Axes.Both; drawable.Size = Vector2.One;