mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 06:03:08 +08:00
Add prioritised user lookups for default skin
This allows user resources to be consumed before falling back to the game bundled assets.
This commit is contained in:
parent
6b9f5812a5
commit
3a16483214
@ -46,13 +46,13 @@ namespace osu.Game.Skinning
|
||||
this.resources = resources;
|
||||
}
|
||||
|
||||
public override Texture GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) => null;
|
||||
public override Texture GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT) => Textures?.Get(componentName, wrapModeS, wrapModeT);
|
||||
|
||||
public override ISample GetSample(ISampleInfo sampleInfo)
|
||||
{
|
||||
foreach (string lookup in sampleInfo.LookupNames)
|
||||
{
|
||||
var sample = resources.AudioManager.Samples.Get(lookup);
|
||||
var sample = Samples?.Get(lookup) ?? resources.AudioManager.Samples.Get(lookup);
|
||||
if (sample != null)
|
||||
return sample;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user