From 9593e66a968d075066512f2a5540d2cfe6b37cc5 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 24 Jun 2019 15:25:01 +0900 Subject: [PATCH] Add some more xmldoc --- osu.Game/Skinning/SkinnableDrawable.cs | 13 ++++++++++--- osu.Game/Skinning/SkinnableSprite.cs | 5 ++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/osu.Game/Skinning/SkinnableDrawable.cs b/osu.Game/Skinning/SkinnableDrawable.cs index dcbb63435a..0a7c398990 100644 --- a/osu.Game/Skinning/SkinnableDrawable.cs +++ b/osu.Game/Skinning/SkinnableDrawable.cs @@ -15,6 +15,10 @@ namespace osu.Game.Skinning } } + /// + /// A drawable which can be skinned via an . + /// + /// The type of drawable. public class SkinnableDrawable : SkinReloadableDrawable where T : Drawable { @@ -32,7 +36,7 @@ namespace osu.Game.Skinning private readonly bool restrictSize; /// - /// + /// Create a new skinnable drawable. /// /// The namespace-complete resource name for this skinnable element. /// A function to create the default skin implementation of this element. @@ -53,7 +57,10 @@ namespace osu.Game.Skinning RelativeSizeAxes = Axes.Both; } - protected virtual bool ApplySizeToDefault => false; + /// + /// Whether to apply size restrictions (specified via ) to the default implementation. + /// + protected virtual bool ApplySizeRestrictionsToDefault => false; protected override void SkinChanged(ISkinSource skin, bool allowFallback) { @@ -69,7 +76,7 @@ namespace osu.Game.Skinning if (Drawable != null) { - if (restrictSize && (!isDefault || ApplySizeToDefault)) + if (restrictSize && (!isDefault || ApplySizeRestrictionsToDefault)) { Drawable.RelativeSizeAxes = Axes.Both; Drawable.Size = Vector2.One; diff --git a/osu.Game/Skinning/SkinnableSprite.cs b/osu.Game/Skinning/SkinnableSprite.cs index 72b5740bd6..9771f4cc19 100644 --- a/osu.Game/Skinning/SkinnableSprite.cs +++ b/osu.Game/Skinning/SkinnableSprite.cs @@ -8,9 +8,12 @@ using osu.Framework.Graphics.Textures; namespace osu.Game.Skinning { + /// + /// A skinnable element which uses a stable sprite and can therefore share implementation logic. + /// public class SkinnableSprite : SkinnableDrawable { - protected override bool ApplySizeToDefault => true; + protected override bool ApplySizeRestrictionsToDefault => true; protected override Sprite CreateDefault(string name) => new Sprite { Texture = textures.Get(name) };