Add FindProvider lookup function

This commit is contained in:
Dean Herbert
2021-05-31 17:04:38 +09:00
parent 1d30791ab0
commit 88ed95e012
5 changed files with 31 additions and 4 deletions

View File

@ -556,5 +556,16 @@ namespace osu.Game.Skinning
Textures?.Dispose();
Samples?.Dispose();
}
ISkin ISkin.FindProvider(Func<ISkin, bool> lookupFunction)
{
if (lookupFunction(this))
return this;
if (!fallbackToDefault)
return null;
return (legacyDefaultFallback as ISkin)?.FindProvider(lookupFunction);
}
}
}