Add comments + cleanup

This commit is contained in:
smoogipoo 2018-09-27 17:33:27 +09:00
parent 8191f03503
commit 1c242556ca
2 changed files with 4 additions and 1 deletions

View File

@ -170,6 +170,7 @@ protected override Texture GetTextureForCharacter(char c)
{ {
string textureName = $"{font}-{c}"; string textureName = $"{font}-{c}";
// Approximate value that brings character sizing roughly in-line with stable
float ratio = 36; float ratio = 36;
var texture = textures.Get($"{textureName}@2x"); var texture = textures.Get($"{textureName}@2x");

View File

@ -18,6 +18,9 @@ public SkinnableDrawable(string name, Func<string, Drawable> defaultImplementati
public class SkinnableDrawable<T> : SkinReloadableDrawable public class SkinnableDrawable<T> : SkinReloadableDrawable
where T : Drawable where T : Drawable
{ {
/// <summary>
/// The displayed component. May or may not be a type-<typeparamref name="T"/> member.
/// </summary>
protected Drawable Drawable { get; private set; } protected Drawable Drawable { get; private set; }
private readonly Func<string, T> createDefault; private readonly Func<string, T> createDefault;
@ -45,7 +48,6 @@ public SkinnableDrawable(string name, Func<string, T> defaultImplementation, Fun
protected override void SkinChanged(ISkinSource skin, bool allowFallback) protected override void SkinChanged(ISkinSource skin, bool allowFallback)
{ {
Drawable = null;
Drawable = skin.GetDrawableComponent(componentName); Drawable = skin.GetDrawableComponent(componentName);
if (Drawable != null) if (Drawable != null)