1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 09:52:53 +08:00

Add support for legacy skins which use animation frames to hide… (#5202)

Add support for legacy skins which use animation frames to hide elements

Co-authored-by: Dan Balasescu <1329837+smoogipoo@users.noreply.github.com>
This commit is contained in:
Dean Herbert 2019-07-01 23:50:38 +09:00 committed by GitHub
commit 0a91931d39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -81,7 +81,10 @@ namespace osu.Game.Skinning
};
}
var texture = GetTexture(componentName);
// temporary allowance is given for skins the fact that stable handles non-animatable items such as hitcircles (incorrectly)
// by (incorrectly) displaying the first frame of animation rather than the non-animated version.
// users have used this to "hide" certain elements like hit300.
var texture = GetTexture($"{componentName}-0") ?? GetTexture(componentName);
if (texture == null)
return null;