1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 10:33:07 +08:00

Also add support in LegacyComboCounter

This commit is contained in:
Dean Herbert 2020-10-16 17:40:15 +09:00
parent 24b0a1b84b
commit a774de2270
3 changed files with 11 additions and 1 deletions

View File

@ -6,6 +6,7 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics.Sprites;
using osu.Game.Skinning;
using osuTK;
@ -246,6 +247,6 @@ namespace osu.Game.Screens.Play.HUD
return difference * rolling_duration;
}
private Drawable createSpriteText() => new LegacySpriteText(skin);
private OsuSpriteText createSpriteText() => (OsuSpriteText)skin.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ComboText));
}
}

View File

@ -8,6 +8,7 @@ namespace osu.Game.Skinning
ComboCounter,
ScoreCounter,
ScoreText,
ComboText,
AccuracyCounter,
}
}

View File

@ -327,6 +327,8 @@ namespace osu.Game.Skinning
private string scorePrefix => GetConfig<LegacySkinConfiguration.LegacySetting, string>(LegacySkinConfiguration.LegacySetting.ScorePrefix)?.Value ?? "score";
private string comboPrefix => GetConfig<LegacySkinConfiguration.LegacySetting, string>(LegacySkinConfiguration.LegacySetting.ComboPrefix)?.Value ?? "score";
private bool hasScoreFont => this.HasFont(scorePrefix);
public override Drawable GetDrawableComponent(ISkinComponent component)
@ -349,6 +351,12 @@ namespace osu.Game.Skinning
case HUDSkinComponents.AccuracyCounter:
return new LegacyAccuracyCounter(this);
case HUDSkinComponents.ComboText:
return new LegacySpriteText(this, comboPrefix)
{
Spacing = new Vector2(-(GetConfig<LegacySkinConfiguration.LegacySetting, int>(LegacySkinConfiguration.LegacySetting.ComboOverlap)?.Value ?? -2), 0)
};
case HUDSkinComponents.ScoreText:
return new LegacySpriteText(this, scorePrefix)
{