mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Merge pull request #5910 from peppy/fix-legacy-skin-text
Fix legacy skin text reading from the wrong source
This commit is contained in:
@ -99,7 +99,7 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
|
||||
return !hasFont(font)
|
||||
? null
|
||||
: new LegacySpriteText(this, font)
|
||||
: new LegacySpriteText(source, font)
|
||||
{
|
||||
// Spacing value was reverse-engineered from the ratio of the rendered sprite size in the visual inspector vs the actual texture size
|
||||
Scale = new Vector2(0.96f),
|
||||
@ -110,13 +110,13 @@ namespace osu.Game.Rulesets.Osu.Skinning
|
||||
return null;
|
||||
}
|
||||
|
||||
public Texture GetTexture(string componentName) => null;
|
||||
public Texture GetTexture(string componentName) => source.GetTexture(componentName);
|
||||
|
||||
public SampleChannel GetSample(ISampleInfo sample) => null;
|
||||
public SampleChannel GetSample(ISampleInfo sample) => source.GetSample(sample);
|
||||
|
||||
public TValue GetValue<TConfiguration, TValue>(Func<TConfiguration, TValue> query) where TConfiguration : SkinConfiguration
|
||||
=> configuration.Value is TConfiguration conf ? query.Invoke(conf) : source.GetValue(query);
|
||||
|
||||
private bool hasFont(string fontName) => GetTexture($"{fontName}-0") != null;
|
||||
private bool hasFont(string fontName) => source.GetTexture($"{fontName}-0") != null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user