osu/osu.Game/Overlays/Settings/SettingsButton.cs
2019-02-15 11:56:33 +09:00

34 lines
962 B
C#

// 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 System.Linq;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings
{
public class SettingsButton : TriangleButton, IHasTooltip
{
public SettingsButton()
{
RelativeSizeAxes = Axes.X;
Padding = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS };
}
public string TooltipText { get; set; }
public override IEnumerable<string> FilterTerms
{
get
{
if (TooltipText != null)
return base.FilterTerms.Append(TooltipText);
return base.FilterTerms;
}
}
}
}