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

Remove text skin components in favour of plain LegacySpriteTexts

This commit is contained in:
Salman Ahmed 2021-03-07 02:30:16 +03:00
parent 91741564e8
commit 64d1cb5193
2 changed files with 1 additions and 22 deletions

View File

@ -9,7 +9,5 @@ namespace osu.Game.Skinning
ScoreCounter,
AccuracyCounter,
HealthDisplay,
ScoreText,
ComboText,
}
}

View File

@ -18,7 +18,6 @@ using osu.Game.Beatmaps.Formats;
using osu.Game.IO;
using osu.Game.Rulesets.Scoring;
using osu.Game.Screens.Play.HUD;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Skinning
@ -327,19 +326,13 @@ namespace osu.Game.Skinning
return null;
}
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)
{
switch (component)
{
case HUDSkinComponent hudComponent:
{
if (!hasScoreFont)
if (!this.HasFont(LegacyFont.Score))
return null;
switch (hudComponent.Component)
@ -355,18 +348,6 @@ namespace osu.Game.Skinning
case HUDSkinComponents.HealthDisplay:
return new LegacyHealthDisplay(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)
{
Spacing = new Vector2(-(GetConfig<LegacySkinConfiguration.LegacySetting, int>(LegacySkinConfiguration.LegacySetting.ScoreOverlap)?.Value ?? -2), 0)
};
}
return null;