mirror of
https://github.com/ppy/osu.git
synced 2026-05-19 15:33:02 +08:00
Merge pull request #33054 from frenzibyte/fix-group-panel-count-pills
Fix group pill count moving with panel selection state
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user