1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:32:55 +08:00

Make comboColours skinnable

This commit is contained in:
Dragicafit 2018-12-07 22:16:09 +01:00
parent dc6574a9cc
commit 667eaf95d8

View File

@ -45,20 +45,20 @@ namespace osu.Game.Skinning
public TValue? GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue?> query) where TConfiguration : SkinConfiguration where TValue : struct
{
TValue? val = null;
TValue? val;
if ((source as Skin)?.Configuration is TConfiguration conf)
val = query?.Invoke(conf);
return val ?? fallbackSource?.GetValue(query);
if (beatmapSkins && (val = query?.Invoke(conf)) != null)
return val;
return fallbackSource?.GetValue(query);
}
public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration where TValue : class
{
TValue val = null;
TValue val;
if ((source as Skin)?.Configuration is TConfiguration conf)
val = query?.Invoke(conf);
return val ?? fallbackSource?.GetValue(query);
if (beatmapSkins && (val = query?.Invoke(conf)) != null)
return val;
return fallbackSource?.GetValue(query);
}
private readonly ISkinSource source;