From 1c242556ca73c5d3044c713d3138242a2bb049ea Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Thu, 27 Sep 2018 17:33:27 +0900 Subject: [PATCH] Add comments + cleanup --- osu.Game/Skinning/LegacySkin.cs | 1 + osu.Game/Skinning/SkinnableDrawable.cs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/osu.Game/Skinning/LegacySkin.cs b/osu.Game/Skinning/LegacySkin.cs index bb37531c3e..67a498730a 100644 --- a/osu.Game/Skinning/LegacySkin.cs +++ b/osu.Game/Skinning/LegacySkin.cs @@ -170,6 +170,7 @@ protected override Texture GetTextureForCharacter(char c) { string textureName = $"{font}-{c}"; + // Approximate value that brings character sizing roughly in-line with stable float ratio = 36; var texture = textures.Get($"{textureName}@2x"); diff --git a/osu.Game/Skinning/SkinnableDrawable.cs b/osu.Game/Skinning/SkinnableDrawable.cs index 9ecd9e647a..5195daee65 100644 --- a/osu.Game/Skinning/SkinnableDrawable.cs +++ b/osu.Game/Skinning/SkinnableDrawable.cs @@ -18,6 +18,9 @@ public SkinnableDrawable(string name, Func defaultImplementati public class SkinnableDrawable : SkinReloadableDrawable where T : Drawable { + /// + /// The displayed component. May or may not be a type- member. + /// protected Drawable Drawable { get; private set; } private readonly Func createDefault; @@ -45,7 +48,6 @@ public SkinnableDrawable(string name, Func defaultImplementation, Fun protected override void SkinChanged(ISkinSource skin, bool allowFallback) { - Drawable = null; Drawable = skin.GetDrawableComponent(componentName); if (Drawable != null)