1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 16:12:54 +08:00

Fix button extending beyond unranked indicator width

This commit is contained in:
Salman Ahmed 2024-05-11 09:25:07 +03:00
parent 0392f7b04c
commit f64cf5c037

View File

@ -73,7 +73,8 @@ namespace osu.Game.Screens.Select.FooterV2
{
UnrankedBadge = new ContainerWithTooltip
{
Position = new Vector2(BUTTON_WIDTH + 5f, -5f),
Margin = new MarginPadding { Left = BUTTON_WIDTH + 5f },
Y = -5f,
Depth = float.MaxValue,
Origin = Anchor.BottomLeft,
Shear = barShear,
@ -233,14 +234,14 @@ namespace osu.Game.Screens.Select.FooterV2
if (Current.Value.Any(m => !m.Ranked))
{
UnrankedBadge.MoveToX(BUTTON_WIDTH + 5, duration, easing);
UnrankedBadge.MoveToX(0, duration, easing);
UnrankedBadge.FadeIn(duration, easing);
this.ResizeWidthTo(BUTTON_WIDTH + UnrankedBadge.DrawWidth + 10, duration, easing);
this.ResizeWidthTo(BUTTON_WIDTH + 5 + UnrankedBadge.DrawWidth, duration, easing);
}
else
{
UnrankedBadge.MoveToX(BUTTON_WIDTH + 5 - UnrankedBadge.DrawWidth, duration, easing);
UnrankedBadge.MoveToX(-UnrankedBadge.DrawWidth, duration, easing);
UnrankedBadge.FadeOut(duration, easing);
this.ResizeWidthTo(BUTTON_WIDTH, duration, easing);