Use rounded button in settings sidebar

This commit is contained in:
Bartłomiej Dach
2021-10-10 20:32:56 +02:00
parent 21ee24ea6d
commit b30dd2d4ed
6 changed files with 30 additions and 19 deletions

View File

@ -1,15 +1,17 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects;
using osu.Game.Graphics.UserInterface;
using osuTK;
namespace osu.Game.Graphics.UserInterfaceV2
{
public class RoundedButton : OsuButton
public class RoundedButton : OsuButton, IFilterable
{
public override float Height
{
@ -44,5 +46,14 @@ namespace osu.Game.Graphics.UserInterfaceV2
}
private void updateCornerRadius() => Content.CornerRadius = DrawHeight / 2;
public virtual IEnumerable<string> FilterTerms => new[] { Text.ToString() };
public bool MatchingFilter
{
set => this.FadeTo(value ? 1 : 0);
}
public bool FilteringActive { get; set; }
}
}