1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Use better conditional for choosing which spinner type to use

Co-authored-by: Dan Balasescu <smoogipoo@smgi.me>
This commit is contained in:
Dean Herbert 2020-08-01 00:05:04 +09:00 committed by GitHub
parent f03bad6513
commit 9e244be489
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,9 +104,11 @@ namespace osu.Game.Rulesets.Osu.Skinning
};
case OsuSkinComponents.SpinnerBody:
if (Source.GetTexture("spinner-top") != null)
bool hasBackground = Source.GetTexture("spinner-background") != null;
if (Source.GetTexture("spinner-top") != null && !hasBackground)
return new LegacyNewStyleSpinner();
else if (Source.GetTexture("spinner-background") != null)
else if (hasBackground)
return new LegacyOldStyleSpinner();
return null;