1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 22:33:05 +08:00

Merge pull request #14865 from bdach/fix-legacy-repeat-arrow-fallback

Fix repeat arrow texture not falling back to default legacy skin
This commit is contained in:
Dean Herbert 2021-09-28 11:07:18 +09:00 committed by GitHub
commit 1567faa7b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 public class LegacyReverseArrow : CompositeDrawable
{ {
private ISkin skin { get; }
[Resolved(canBeNull: true)] [Resolved(canBeNull: true)]
private DrawableHitObject drawableHitObject { get; set; } private DrawableHitObject drawableHitObject { get; set; }
private Drawable proxy; private Drawable proxy;
public LegacyReverseArrow(ISkin skin)
{
this.skin = skin;
}
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load(ISkinSource skinSource)
{ {
AutoSizeAxes = Axes.Both; AutoSizeAxes = Axes.Both;
string lookupName = new OsuSkinComponent(OsuSkinComponents.ReverseArrow).LookupName; string lookupName = new OsuSkinComponent(OsuSkinComponents.ReverseArrow).LookupName;
InternalChild = skin.GetAnimation(lookupName, true, true) ?? Empty(); var skin = skinSource.FindProvider(s => s.GetTexture(lookupName) != null);
InternalChild = skin?.GetAnimation(lookupName, true, true) ?? Empty();
} }
protected override void LoadComplete() protected override void LoadComplete()

View File

@ -73,7 +73,7 @@ namespace osu.Game.Rulesets.Osu.Skinning.Legacy
case OsuSkinComponents.ReverseArrow: case OsuSkinComponents.ReverseArrow:
if (hasHitCircle.Value) if (hasHitCircle.Value)
return new LegacyReverseArrow(this); return new LegacyReverseArrow();
return null; return null;