mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Introduce the concept of SkinComponents
Removes reliance on string lookups and better defines elements for introduction into database
This commit is contained in:
@ -19,11 +19,11 @@ namespace osu.Game.Skinning
|
||||
[Resolved]
|
||||
private TextureStore textures { get; set; }
|
||||
|
||||
public SkinnableSprite(string name, Func<ISkinSource, bool> allowFallback = null, ConfineMode confineMode = ConfineMode.ScaleDownToFit)
|
||||
: base(name, allowFallback, confineMode)
|
||||
public SkinnableSprite(ISkinComponent component, Func<ISkinSource, bool> allowFallback = null, ConfineMode confineMode = ConfineMode.ScaleDownToFit)
|
||||
: base(component, allowFallback, confineMode)
|
||||
{
|
||||
}
|
||||
|
||||
protected override Drawable CreateDefault(string name) => new Sprite { Texture = textures.Get(name) };
|
||||
protected override Drawable CreateDefault(ISkinComponent component) => new Sprite { Texture = textures.Get(component.LookupName) };
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user