mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 13:23:05 +08:00
Reuse AllSources
when looking up on FindProvider
This commit is contained in:
parent
b12adc6073
commit
d0cdc07b11
@ -236,14 +236,11 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
public ISkin FindProvider(Func<ISkin, bool> lookupFunction)
|
public ISkin FindProvider(Func<ISkin, bool> lookupFunction)
|
||||||
{
|
{
|
||||||
if (lookupFunction(CurrentSkin.Value))
|
foreach (var source in AllSources)
|
||||||
return CurrentSkin.Value;
|
{
|
||||||
|
if (lookupFunction(source))
|
||||||
if (CurrentSkin.Value is LegacySkin && lookupFunction(DefaultLegacySkin))
|
return source;
|
||||||
return DefaultLegacySkin;
|
}
|
||||||
|
|
||||||
if (lookupFunction(DefaultSkin))
|
|
||||||
return DefaultSkin;
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user