mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08:00
Move combo font retrieval inside the legacy component
This commit is contained in:
parent
fafdbb0a81
commit
0e9242ee9a
@ -55,11 +55,10 @@ namespace osu.Game.Rulesets.Catch.Skinning
|
||||
|
||||
case CatchSkinComponents.CatchComboCounter:
|
||||
var comboFont = GetConfig<LegacySetting, string>(LegacySetting.ComboPrefix)?.Value ?? "score";
|
||||
var fontOverlap = GetConfig<LegacySetting, float>(LegacySetting.ComboOverlap)?.Value ?? -2f;
|
||||
|
||||
// For simplicity, let's use legacy combo font texture existence as a way to identify legacy skins from default.
|
||||
if (this.HasFont(comboFont))
|
||||
return new LegacyComboCounter(Source, comboFont, fontOverlap);
|
||||
return new LegacyComboCounter(Source);
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -13,6 +13,7 @@ using osu.Game.Screens.Play;
|
||||
using osu.Game.Skinning;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using static osu.Game.Skinning.LegacySkinConfiguration;
|
||||
|
||||
namespace osu.Game.Rulesets.Catch.Skinning
|
||||
{
|
||||
@ -28,12 +29,12 @@ namespace osu.Game.Rulesets.Catch.Skinning
|
||||
|
||||
private readonly LegacyRollingCounter counter;
|
||||
|
||||
public LegacyComboCounter(ISkin skin, string fontName, float fontOverlap)
|
||||
public LegacyComboCounter(ISkin skin)
|
||||
{
|
||||
this.skin = skin;
|
||||
|
||||
this.fontName = fontName;
|
||||
this.fontOverlap = fontOverlap;
|
||||
fontName = skin.GetConfig<LegacySetting, string>(LegacySetting.ComboPrefix)?.Value ?? "score";
|
||||
fontOverlap = skin.GetConfig<LegacySetting, float>(LegacySetting.ComboOverlap)?.Value ?? -2f;
|
||||
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user