mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Add GetTexture method to ISkinSource
Used to shortcut lookup checks without potentially expensive drawable creation overhead.
This commit is contained in:
@ -57,12 +57,14 @@ namespace osu.Game.Skinning
|
||||
break;
|
||||
}
|
||||
|
||||
var texture = Textures.Get(componentName);
|
||||
var texture = GetTexture(componentName);
|
||||
if (texture == null) return null;
|
||||
|
||||
return new Sprite { Texture = texture };
|
||||
}
|
||||
|
||||
public override Texture GetTexture(string componentName) => Textures.Get(componentName);
|
||||
|
||||
public override SampleChannel GetSample(string sampleName) => Samples.Get(sampleName);
|
||||
|
||||
protected class LegacySkinResourceStore<T> : IResourceStore<byte[]>
|
||||
|
Reference in New Issue
Block a user