mirror of
https://github.com/SK-la/Ez2Lazer.git
synced 2026-03-15 03:20:27 +00:00
Add basic support for scoreentry- skinnable text
This commit is contained in:
@@ -11,5 +11,6 @@ namespace osu.Game.Skinning
|
||||
Score,
|
||||
Combo,
|
||||
HitCircle,
|
||||
ScoreEntry,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Screens.Play.HUD;
|
||||
|
||||
namespace osu.Game.Skinning
|
||||
@@ -32,7 +31,7 @@ namespace osu.Game.Skinning
|
||||
}
|
||||
|
||||
private readonly Container keyContainer;
|
||||
private readonly OsuSpriteText overlayKeyText;
|
||||
private readonly LegacySpriteText overlayKeyText;
|
||||
private readonly Sprite keySprite;
|
||||
|
||||
public LegacyKeyCounter(InputTrigger trigger)
|
||||
@@ -57,13 +56,12 @@ namespace osu.Game.Skinning
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Child = overlayKeyText = new OsuSpriteText
|
||||
Child = overlayKeyText = new LegacySpriteText(LegacyFont.ScoreEntry)
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Text = trigger.Name,
|
||||
Colour = textColour,
|
||||
Font = OsuFont.GetFont(weight: FontWeight.SemiBold),
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -88,7 +86,6 @@ namespace osu.Game.Skinning
|
||||
keyContainer.ScaleTo(0.75f, transition_duration, Easing.Out);
|
||||
keySprite.Colour = ActiveColour;
|
||||
overlayKeyText.Text = CountPresses.Value.ToString();
|
||||
overlayKeyText.Font = overlayKeyText.Font.With(weight: FontWeight.SemiBold);
|
||||
}
|
||||
|
||||
protected override void Deactivate(bool forwardPlayback = true)
|
||||
|
||||
@@ -55,7 +55,8 @@ namespace osu.Game.Skinning
|
||||
}
|
||||
}
|
||||
|
||||
public static Texture[] GetTextures(this ISkin? source, string componentName, WrapMode wrapModeS, WrapMode wrapModeT, bool animatable, string animationSeparator, Vector2? maxSize, out ISkin? retrievalSource)
|
||||
public static Texture[] GetTextures(this ISkin? source, string componentName, WrapMode wrapModeS, WrapMode wrapModeT, bool animatable, string animationSeparator, Vector2? maxSize,
|
||||
out ISkin? retrievalSource)
|
||||
{
|
||||
retrievalSource = null;
|
||||
|
||||
@@ -140,6 +141,9 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
switch (font)
|
||||
{
|
||||
case LegacyFont.ScoreEntry:
|
||||
return "scoreentry";
|
||||
|
||||
case LegacyFont.Score:
|
||||
return source.GetConfig<LegacySetting, string>(LegacySetting.ScorePrefix)?.Value ?? "score";
|
||||
|
||||
@@ -163,6 +167,9 @@ namespace osu.Game.Skinning
|
||||
{
|
||||
switch (font)
|
||||
{
|
||||
case LegacyFont.ScoreEntry:
|
||||
return 0;
|
||||
|
||||
case LegacyFont.Score:
|
||||
return source.GetConfig<LegacySetting, float>(LegacySetting.ScoreOverlap)?.Value ?? 0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user