mirror of
https://github.com/ppy/osu
synced 2025-02-17 10:57:03 +00:00
Add comments + cleanup
This commit is contained in:
parent
8191f03503
commit
1c242556ca
@ -170,6 +170,7 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
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");
|
||||||
|
@ -18,6 +18,9 @@ namespace osu.Game.Skinning
|
|||||||
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 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
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)
|
||||||
|
Loading…
Reference in New Issue
Block a user