1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-25 10:30:16 +08:00

Fix argon judgement counter looking misaligned with wireframe off

Closes https://github.com/ppy/osu/issues/34959.

`ArgonCounterTextComponent` is pretty terrible and prevents being able
to fix the issue easily. The core issue is that this is the first
instance of the component's usage where the label text can be longer
than the counter in the X dimension, so the total width of any counter
is equal to max(label width, counter width), and the label will be
aligned to the left of that width, while the counter will be aligned to
the right of that width.

The fix sort of relies on the fact that I don't expect *any* consumer of
`ArgonCounterTextComponent` that meaningfully uses the wireframe digits
to want the non-wireframe digits to be aligned to the *left* rather than
the right. It's not what I'd expect any segmented display to work.
(There are usages that specify `TopLeft` anchor, but they usually
display the same number of wireframe and non-wireframe digits, so for
them it doesn't really matter if the digits are left-aligned to the
wireframes or not.)
This commit is contained in:
Bartłomiej Dach
2025-09-13 11:11:45 +09:00
Unverified
parent a9c021ce04
commit e73e9275ba
2 changed files with 5 additions and 5 deletions
@@ -74,13 +74,13 @@ namespace osu.Game.Screens.Play.HUD
{
wireframesPart = new ArgonCounterSpriteText(wireframesLookup)
{
Anchor = anchor,
Origin = anchor,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
},
textPart = new ArgonCounterSpriteText(textLookup)
{
Anchor = anchor,
Origin = anchor,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
},
}
}
@@ -37,7 +37,7 @@ namespace osu.Game.Skinning.Components
Result = result;
AutoSizeAxes = Axes.Both;
AddInternal(textComponent = new ArgonCounterTextComponent(Anchor.TopRight, result.DisplayName.ToUpper()));
AddInternal(textComponent = new ArgonCounterTextComponent(Anchor.TopLeft, result.DisplayName.ToUpper()));
}
private void updateWireframe()