diff --git a/osu.Game/Screens/SelectV2/PanelGroup.cs b/osu.Game/Screens/SelectV2/PanelGroup.cs index 4370146dbc..bf9ea0e3c6 100644 --- a/osu.Game/Screens/SelectV2/PanelGroup.cs +++ b/osu.Game/Screens/SelectV2/PanelGroup.cs @@ -26,6 +26,7 @@ namespace osu.Game.Screens.SelectV2 private Drawable iconContainer = null!; private OsuSpriteText titleText = null!; private TrianglesV2 triangles = null!; + private CircularContainer countPill = null!; private OsuSpriteText countText = null!; private Box glow = null!; @@ -86,12 +87,12 @@ namespace osu.Game.Screens.SelectV2 UseFullGlyphHeight = false, X = 10f, }, - new CircularContainer + countPill = new CircularContainer { Anchor = Anchor.CentreRight, Origin = Anchor.CentreRight, Size = new Vector2(50f, 14f), - Margin = new MarginPadding { Right = 20f }, + Margin = new MarginPadding { Right = 30f }, Masking = true, Children = new Drawable[] { @@ -145,5 +146,13 @@ namespace osu.Game.Screens.SelectV2 titleText.Text = group.Title; countText.Text = Item.NestedItemCount.ToString("N0"); } + + protected override void Update() + { + base.Update(); + + // Move the count pill in the opposite direction to keep it pinned to the screen regardless of the X position of TopLevelContent. + countPill.X = -TopLevelContent.X; + } } }