Add ability to lookup arbitrary SkinConfiguration values

This commit is contained in:
Dean Herbert
2018-03-22 18:10:28 +09:00
parent c4fe6a04c5
commit 425d4aa766
4 changed files with 36 additions and 2 deletions

View File

@ -119,10 +119,14 @@ namespace osu.Game.Skinning
public Drawable GetDrawableComponent(string componentName) => CurrentSkin.Value.GetDrawableComponent(componentName);
public Texture GetTexture(string componentName)=> CurrentSkin.Value.GetTexture(componentName);
public Texture GetTexture(string componentName) => CurrentSkin.Value.GetTexture(componentName);
public SampleChannel GetSample(string sampleName) => CurrentSkin.Value.GetSample(sampleName);
public Color4? GetColour(string colourName) => CurrentSkin.Value.GetColour(colourName);
public TValue GetConfiguration<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration where TValue : class => CurrentSkin.Value.GetConfiguration(query);
public TValue? GetConfiguration<TConfiguration, TValue>(Func<TConfiguration, TValue?> query) where TConfiguration : SkinConfiguration where TValue : struct => CurrentSkin.Value.GetConfiguration(query);
}
}