2019-01-24 16:43:03 +08:00
|
|
|
|
// 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.
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
2019-02-15 10:56:33 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
2019-02-15 10:56:33 +08:00
|
|
|
|
using osu.Framework.Graphics.Cursor;
|
2021-06-26 01:10:04 +08:00
|
|
|
|
using osu.Framework.Localisation;
|
2021-10-11 02:32:56 +08:00
|
|
|
|
using osu.Game.Graphics.UserInterfaceV2;
|
2018-04-13 17:19:50 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Settings
|
|
|
|
|
{
|
2022-11-24 13:32:20 +08:00
|
|
|
|
public partial class SettingsButton : RoundedButton, IHasTooltip
|
2018-04-13 17:19:50 +08:00
|
|
|
|
{
|
|
|
|
|
public SettingsButton()
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.X;
|
2019-05-14 09:45:05 +08:00
|
|
|
|
Padding = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS, Right = SettingsPanel.CONTENT_MARGINS };
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
2019-02-15 10:56:33 +08:00
|
|
|
|
|
2021-06-26 01:10:04 +08:00
|
|
|
|
public LocalisableString TooltipText { get; set; }
|
2019-02-15 10:56:33 +08:00
|
|
|
|
|
2022-05-16 13:09:37 +08:00
|
|
|
|
public override IEnumerable<LocalisableString> FilterTerms
|
2019-02-15 10:56:33 +08:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
2021-06-26 01:10:04 +08:00
|
|
|
|
if (TooltipText != default)
|
2022-05-16 13:09:37 +08:00
|
|
|
|
return base.FilterTerms.Append(TooltipText);
|
2019-02-15 10:56:33 +08:00
|
|
|
|
|
|
|
|
|
return base.FilterTerms;
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-04-13 17:19:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|