Add GetTexture method to ISkinSource

Used to shortcut lookup checks without potentially expensive drawable creation overhead.
This commit is contained in:
Dean Herbert
2018-03-20 16:28:39 +09:00
parent 9ad4e9284a
commit f03abb3145
6 changed files with 18 additions and 1 deletions

View File

@ -10,6 +10,7 @@ using osu.Framework.Audio;
using osu.Framework.Audio.Sample;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using osu.Framework.Platform;
using osu.Game.Database;
using osu.Game.IO.Archives;
@ -119,6 +120,8 @@ namespace osu.Game.Skinning
public Drawable GetDrawableComponent(string componentName) => CurrentSkin.Value.GetDrawableComponent(componentName);
public Texture GetTexture(string componentName)=> CurrentSkin.Value.GetTexture(componentName);
public SampleChannel GetSample(string sampleName) => CurrentSkin.Value.GetSample(sampleName);
public Color4? GetComboColour(IHasComboIndex comboObject) => CurrentSkin.Value.GetComboColour(comboObject);