diff --git a/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs b/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs index 33223a526b..0414cbaea4 100644 --- a/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs +++ b/osu.Game/Screens/Play/HUD/ArgonAccuracyCounter.cs @@ -1,18 +1,30 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using osu.Framework.Bindables; using osu.Framework.Graphics; -using osu.Game.Graphics; -using osu.Game.Graphics.Sprites; +using osu.Framework.Graphics.Sprites; +using osu.Game.Configuration; using osu.Game.Skinning; +using osuTK; namespace osu.Game.Screens.Play.HUD { public partial class ArgonAccuracyCounter : GameplayAccuracyCounter, ISerialisableDrawable { + [SettingSource("Wireframe opacity", "Controls the opacity of the wire frames behind the digits.")] + public BindableFloat WireframeOpacity { get; } = new BindableFloat(0.4f) + { + Precision = 0.01f, + MinValue = 0, + MaxValue = 1, + }; + public bool UsesFixedAnchor { get; set; } - protected override OsuSpriteText CreateSpriteText() - => base.CreateSpriteText().With(s => s.Font = OsuFont.Default.With(size: 19.2f)); + protected override IHasText CreateText() => new ArgonCounterTextComponent(Anchor.TopLeft, "ACCURACY", new Vector2(-4, 0)) + { + WireframeOpacity = { BindTarget = WireframeOpacity }, + }; } } diff --git a/osu.Game/Screens/Play/HUD/ArgonCounterTextComponent.cs b/osu.Game/Screens/Play/HUD/ArgonCounterTextComponent.cs index 9545168a46..fcad0f12d8 100644 --- a/osu.Game/Screens/Play/HUD/ArgonCounterTextComponent.cs +++ b/osu.Game/Screens/Play/HUD/ArgonCounterTextComponent.cs @@ -38,7 +38,7 @@ namespace osu.Game.Screens.Play.HUD } } - public ArgonCounterTextComponent(Anchor anchor, LocalisableString? label = null) + public ArgonCounterTextComponent(Anchor anchor, LocalisableString? label = null, Vector2? spacing = null) { Anchor = anchor; Origin = anchor; @@ -49,11 +49,13 @@ namespace osu.Game.Screens.Play.HUD { Anchor = anchor, Origin = anchor, + Spacing = spacing ?? new Vector2(-2, 0), }; textPart = new ArgonCounterSpriteText { Anchor = anchor, Origin = anchor, + Spacing = spacing ?? new Vector2(-2, 0), }; } @@ -115,9 +117,7 @@ namespace osu.Game.Screens.Play.HUD private void load(ISkinSource skin) { // todo: rename font - Font = new FontUsage(@"argon-score", 1, fixedWidth: true); - Spacing = new Vector2(-2, 0); - + Font = new FontUsage(@"argon-score", 1); glyphStore = new GlyphStore(skin, glyphLookupOverride); } diff --git a/osu.Game/Skinning/ArgonSkin.cs b/osu.Game/Skinning/ArgonSkin.cs index 95e1820059..2af3a29804 100644 --- a/osu.Game/Skinning/ArgonSkin.cs +++ b/osu.Game/Skinning/ArgonSkin.cs @@ -143,14 +143,14 @@ namespace osu.Game.Skinning score.Origin = Anchor.TopRight; score.Position = new Vector2(components_x_offset + 200, scoreWedge.Y + 30); } + } - if (accuracy != null) - { - // +4 to vertically align the accuracy counter with the score counter. - accuracy.Position = new Vector2(components_x_offset + 4, scoreWedge.Y + 45); - accuracy.Anchor = Anchor.TopLeft; - accuracy.Origin = Anchor.TopLeft; - } + if (accuracy != null) + { + // +4 to vertically align the accuracy counter with the score counter. + accuracy.Position = new Vector2(-20, 20); + accuracy.Anchor = Anchor.TopRight; + accuracy.Origin = Anchor.TopRight; } var hitError = container.OfType().FirstOrDefault();