mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:42:56 +08:00
Also add support in LegacyComboCounter
This commit is contained in:
parent
24b0a1b84b
commit
a774de2270
@ -6,6 +6,7 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -246,6 +247,6 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
return difference * rolling_duration;
|
return difference * rolling_duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable createSpriteText() => new LegacySpriteText(skin);
|
private OsuSpriteText createSpriteText() => (OsuSpriteText)skin.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ComboText));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,7 @@ namespace osu.Game.Skinning
|
|||||||
ComboCounter,
|
ComboCounter,
|
||||||
ScoreCounter,
|
ScoreCounter,
|
||||||
ScoreText,
|
ScoreText,
|
||||||
|
ComboText,
|
||||||
AccuracyCounter,
|
AccuracyCounter,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -327,6 +327,8 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
private string scorePrefix => GetConfig<LegacySkinConfiguration.LegacySetting, string>(LegacySkinConfiguration.LegacySetting.ScorePrefix)?.Value ?? "score";
|
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);
|
private bool hasScoreFont => this.HasFont(scorePrefix);
|
||||||
|
|
||||||
public override Drawable GetDrawableComponent(ISkinComponent component)
|
public override Drawable GetDrawableComponent(ISkinComponent component)
|
||||||
@ -349,6 +351,12 @@ namespace osu.Game.Skinning
|
|||||||
case HUDSkinComponents.AccuracyCounter:
|
case HUDSkinComponents.AccuracyCounter:
|
||||||
return new LegacyAccuracyCounter(this);
|
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:
|
case HUDSkinComponents.ScoreText:
|
||||||
return new LegacySpriteText(this, scorePrefix)
|
return new LegacySpriteText(this, scorePrefix)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user