mirror of
https://github.com/osukey/osukey.git
synced 2025-05-30 18:07:27 +09: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:
|
case CatchSkinComponents.CatchComboCounter:
|
||||||
var comboFont = GetConfig<LegacySetting, string>(LegacySetting.ComboPrefix)?.Value ?? "score";
|
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.
|
// For simplicity, let's use legacy combo font texture existence as a way to identify legacy skins from default.
|
||||||
if (this.HasFont(comboFont))
|
if (this.HasFont(comboFont))
|
||||||
return new LegacyComboCounter(Source, comboFont, fontOverlap);
|
return new LegacyComboCounter(Source);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ using osu.Game.Screens.Play;
|
|||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
using static osu.Game.Skinning.LegacySkinConfiguration;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Catch.Skinning
|
namespace osu.Game.Rulesets.Catch.Skinning
|
||||||
{
|
{
|
||||||
@ -28,12 +29,12 @@ namespace osu.Game.Rulesets.Catch.Skinning
|
|||||||
|
|
||||||
private readonly LegacyRollingCounter counter;
|
private readonly LegacyRollingCounter counter;
|
||||||
|
|
||||||
public LegacyComboCounter(ISkin skin, string fontName, float fontOverlap)
|
public LegacyComboCounter(ISkin skin)
|
||||||
{
|
{
|
||||||
this.skin = skin;
|
this.skin = skin;
|
||||||
|
|
||||||
this.fontName = fontName;
|
fontName = skin.GetConfig<LegacySetting, string>(LegacySetting.ComboPrefix)?.Value ?? "score";
|
||||||
this.fontOverlap = fontOverlap;
|
fontOverlap = skin.GetConfig<LegacySetting, float>(LegacySetting.ComboOverlap)?.Value ?? -2f;
|
||||||
|
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user