mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 18:27:19 +08:00
Fix triangles showing on ExpandableButton
s when in contracted state
This commit is contained in:
parent
d0c4637683
commit
76e9382e0b
@ -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)
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user