Fix repeat arrow texture not falling back to default legacy skin

This commit is contained in:
Bartłomiej Dach 2021-09-27 21:45:26 +02:00
parent dc24fd7e5b
commit 7a0499ad07
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
2 changed files with 4 additions and 10 deletions

View File

@ -13,26 +13,20 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
{
public class LegacyReverseArrow : CompositeDrawable
{
private ISkin skin { get; }
[Resolved(canBeNull: true)]
private DrawableHitObject drawableHitObject { get; set; }
private Drawable proxy;
public LegacyReverseArrow(ISkin skin)
{
this.skin = skin;
}
[BackgroundDependencyLoader]
private void load()
private void load(ISkinSource skinSource)
{
AutoSizeAxes = Axes.Both;
string lookupName = new OsuSkinComponent(OsuSkinComponents.ReverseArrow).LookupName;
InternalChild = skin.GetAnimation(lookupName, true, true) ?? Empty();
var skin = skinSource.FindProvider(skin => skin.GetTexture(lookupName) != null);
InternalChild = skin?.GetAnimation(lookupName, true, true) ?? Empty();
}
protected override void LoadComplete()

View File

@ -73,7 +73,7 @@ public override Drawable GetDrawableComponent(ISkinComponent component)
case OsuSkinComponents.ReverseArrow:
if (hasHitCircle.Value)
return new LegacyReverseArrow(this);
return new LegacyReverseArrow();
return null;