From 4fbca4037c45b67e192396903ffc8a448ff09ef9 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 24 Nov 2022 15:08:03 +0900 Subject: [PATCH] Update existing triangle buttons to use `RoundedButton` --- .../Graphics/UserInterface/TriangleButton.cs | 32 ++----------------- 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/TriangleButton.cs b/osu.Game/Graphics/UserInterface/TriangleButton.cs index 60d1824e5a..891c8f779f 100644 --- a/osu.Game/Graphics/UserInterface/TriangleButton.cs +++ b/osu.Game/Graphics/UserInterface/TriangleButton.cs @@ -1,42 +1,14 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. -#nullable disable - -using System.Collections.Generic; -using osu.Framework.Allocation; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Localisation; -using osu.Game.Graphics.Backgrounds; +using osu.Game.Graphics.UserInterfaceV2; namespace osu.Game.Graphics.UserInterface { /// /// A button with moving triangles in the background. /// - public class TriangleButton : OsuButton, IFilterable + public class TriangleButton : RoundedButton { - protected Triangles Triangles { get; private set; } - - [BackgroundDependencyLoader] - private void load(OsuColour colours) - { - Add(Triangles = new Triangles - { - RelativeSizeAxes = Axes.Both, - ColourDark = colours.BlueDarker, - ColourLight = colours.Blue, - }); - } - - public virtual IEnumerable FilterTerms => new[] { Text }; - - public bool MatchingFilter - { - set => this.FadeTo(value ? 1 : 0); - } - - public bool FilteringActive { get; set; } } }