1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:12:57 +08:00

Merge remote-tracking branch 'upstream/master' into test-working-beatmap-clock

This commit is contained in:
Dean Herbert 2019-02-20 12:08:37 +09:00
commit a6e055b1f8
3 changed files with 19 additions and 2 deletions

View File

@ -27,7 +27,7 @@ namespace osu.Game.Graphics.UserInterface
}); });
} }
public IEnumerable<string> FilterTerms => new[] { Text }; public virtual IEnumerable<string> FilterTerms => new[] { Text };
public bool MatchingFilter public bool MatchingFilter
{ {

View File

@ -16,6 +16,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
new SettingsButton new SettingsButton
{ {
Text = "Key configuration", Text = "Key configuration",
TooltipText = "Change global shortcut keys and gameplay bindings",
Action = keyConfig.ToggleVisibility Action = keyConfig.ToggleVisibility
}, },
}; };

View File

@ -1,17 +1,33 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. // 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. // 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;
using osu.Framework.Graphics.Cursor;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Settings namespace osu.Game.Overlays.Settings
{ {
public class SettingsButton : TriangleButton public class SettingsButton : TriangleButton, IHasTooltip
{ {
public SettingsButton() public SettingsButton()
{ {
RelativeSizeAxes = Axes.X; RelativeSizeAxes = Axes.X;
Padding = new MarginPadding { Left = SettingsOverlay.CONTENT_MARGINS, Right = SettingsOverlay.CONTENT_MARGINS }; 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;
}
}
} }
} }