1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 15:47:26 +08:00

Fix colours with 0 alpha being invisible in legacy skins

This commit is contained in:
smoogipoo 2020-06-25 13:40:26 +09:00
parent f381cf3ae8
commit ac5cd8f25a

View File

@ -271,7 +271,15 @@ namespace osu.Game.Skinning
}
private IBindable<Color4> getCustomColour(IHasCustomColours source, string lookup)
=> source.CustomColours.TryGetValue(lookup, out var col) ? new Bindable<Color4>(col) : null;
{
if (!source.CustomColours.TryGetValue(lookup, out var col))
return null;
if (col.A == 0)
col.A = 1;
return new Bindable<Color4>(col);
}
private IBindable<string> getManiaImage(LegacyManiaSkinConfiguration source, string lookup)
=> source.ImageLookups.TryGetValue(lookup, out var image) ? new Bindable<string>(image) : null;