mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Merge branch 'skinnable-combo-counter' into skinnable-score-display
This commit is contained in:
@ -6,8 +6,6 @@ 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;
|
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
|
|
||||||
@ -248,10 +246,6 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
return difference * rolling_duration;
|
return difference * rolling_duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Drawable createSpriteText() => skin?.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ScoreText)) ?? new OsuSpriteText
|
private Drawable createSpriteText() => new LegacySpriteText(skin);
|
||||||
{
|
|
||||||
Font = OsuFont.Numeric.With(size: 40),
|
|
||||||
UseFullGlyphHeight = false,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,6 @@ namespace osu.Game.Skinning
|
|||||||
public enum HUDSkinComponents
|
public enum HUDSkinComponents
|
||||||
{
|
{
|
||||||
ComboCounter,
|
ComboCounter,
|
||||||
ScoreText,
|
|
||||||
ScoreCounter
|
ScoreCounter
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -324,12 +324,19 @@ namespace osu.Game.Skinning
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private const string score_font = "score";
|
||||||
|
|
||||||
|
private bool hasScoreFont => this.HasFont(score_font);
|
||||||
|
|
||||||
public override Drawable GetDrawableComponent(ISkinComponent component)
|
public override Drawable GetDrawableComponent(ISkinComponent component)
|
||||||
{
|
{
|
||||||
switch (component)
|
switch (component)
|
||||||
{
|
{
|
||||||
case HUDSkinComponent hudComponent:
|
case HUDSkinComponent hudComponent:
|
||||||
{
|
{
|
||||||
|
if (!hasScoreFont)
|
||||||
|
return null;
|
||||||
|
|
||||||
switch (hudComponent.Component)
|
switch (hudComponent.Component)
|
||||||
{
|
{
|
||||||
case HUDSkinComponents.ComboCounter:
|
case HUDSkinComponents.ComboCounter:
|
||||||
@ -337,14 +344,6 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
case HUDSkinComponents.ScoreCounter:
|
case HUDSkinComponents.ScoreCounter:
|
||||||
return new LegacyScoreCounter(this);
|
return new LegacyScoreCounter(this);
|
||||||
|
|
||||||
case HUDSkinComponents.ScoreText:
|
|
||||||
const string font = "score";
|
|
||||||
|
|
||||||
if (!this.HasFont(font))
|
|
||||||
return null;
|
|
||||||
|
|
||||||
return new LegacySpriteText(this, font);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
@ -12,7 +12,7 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
private readonly LegacyGlyphStore glyphStore;
|
private readonly LegacyGlyphStore glyphStore;
|
||||||
|
|
||||||
public LegacySpriteText(ISkin skin, string font)
|
public LegacySpriteText(ISkin skin, string font = "score")
|
||||||
{
|
{
|
||||||
Shadow = false;
|
Shadow = false;
|
||||||
UseFullGlyphHeight = false;
|
UseFullGlyphHeight = false;
|
||||||
|
Reference in New Issue
Block a user