mirror of
https://github.com/osukey/osukey.git
synced 2025-08-02 22:26:41 +09:00
Merge remote-tracking branch 'upstream/master' into add-ruleset-legacy-skin
This commit is contained in:
@ -16,6 +16,7 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.IO.Stores;
|
||||
using osu.Framework.Text;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
@ -135,7 +136,22 @@ namespace osu.Game.Skinning
|
||||
return texture;
|
||||
}
|
||||
|
||||
public override SampleChannel GetSample(string sampleName) => Samples.Get(getFallbackName(sampleName));
|
||||
public override SampleChannel GetSample(ISampleInfo sampleInfo)
|
||||
{
|
||||
foreach (var lookup in sampleInfo.LookupNames)
|
||||
{
|
||||
var sample = Samples.Get(getFallbackName(lookup));
|
||||
|
||||
if (sample != null)
|
||||
return sample;
|
||||
}
|
||||
|
||||
if (sampleInfo is HitSampleInfo hsi)
|
||||
// Try fallback to non-bank samples.
|
||||
return Samples.Get(hsi.Name);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool hasFont(string fontName) => GetTexture($"{fontName}-0") != null;
|
||||
|
||||
|
Reference in New Issue
Block a user