diff --git a/osu.Game/Graphics/UserInterfaceV2/RoundedButton.cs b/osu.Game/Graphics/UserInterfaceV2/RoundedButton.cs index 4de4a14042..c40622190f 100644 --- a/osu.Game/Graphics/UserInterfaceV2/RoundedButton.cs +++ b/osu.Game/Graphics/UserInterfaceV2/RoundedButton.cs @@ -18,7 +18,7 @@ namespace osu.Game.Graphics.UserInterfaceV2 { public class RoundedButton : OsuButton, IFilterable { - private TrianglesV2? triangles; + protected TrianglesV2? Triangles { get; private set; } protected override float HoverLayerFinalAlpha => 0; @@ -63,7 +63,7 @@ namespace osu.Game.Graphics.UserInterfaceV2 updateCornerRadius(); - Add(triangles = new TrianglesV2 + Add(Triangles = new TrianglesV2 { Thickness = 0.02f, SpawnRatio = 0.6f, @@ -76,13 +76,13 @@ namespace osu.Game.Graphics.UserInterfaceV2 private void updateColours() { - if (triangles == null) + if (Triangles == null) return; Debug.Assert(triangleGradientSecondColour != null); - triangles.ColourTop = triangleGradientSecondColour.Value; - triangles.ColourBottom = BackgroundColour; + Triangles.ColourTop = triangleGradientSecondColour.Value; + Triangles.ColourBottom = BackgroundColour; } protected override bool OnHover(HoverEvent e) diff --git a/osu.Game/Rulesets/Edit/ExpandableButton.cs b/osu.Game/Rulesets/Edit/ExpandableButton.cs index a66600bd58..91bcc21c1b 100644 --- a/osu.Game/Rulesets/Edit/ExpandableButton.cs +++ b/osu.Game/Rulesets/Edit/ExpandableButton.cs @@ -86,6 +86,7 @@ namespace osu.Game.Rulesets.Edit SpriteText.Font = OsuFont.GetFont(weight: FontWeight.Bold); base.Height = actualHeight; Background.Show(); + Triangles?.Show(); } else { @@ -94,6 +95,7 @@ namespace osu.Game.Rulesets.Edit SpriteText.Font = OsuFont.GetFont(weight: FontWeight.Regular); base.Height = actualHeight / 2; Background.Hide(); + Triangles?.Hide(); } }, true); }