Transform CatchSkinColour lookup to skin configuration custom colours lookup

This commit is contained in:
Salman Ahmed 2020-04-05 00:10:25 +03:00
parent 10e65c4f53
commit 55d076d6f3
1 changed files with 10 additions and 1 deletions

View File

@ -65,6 +65,15 @@ public Drawable GetDrawableComponent(ISkinComponent component)
public SampleChannel GetSample(ISampleInfo sample) => source.GetSample(sample);
public IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup) => source.GetConfig<TLookup, TValue>(lookup);
public IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup)
{
switch (lookup)
{
case CatchSkinColour colour:
return source.GetConfig<SkinCustomColourLookup, TValue>(new SkinCustomColourLookup(colour));
}
return source.GetConfig<TLookup, TValue>(lookup);
}
}
}