-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ppy#22385 from peppy/touchscreen-settings-keyword
Fix touch input handler settings not matching search for "touchscreen"
- Loading branch information
Showing
2 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
osu.Game/Overlays/Settings/Sections/Input/TouchSettings.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// 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.Allocation; | ||
using osu.Framework.Graphics; | ||
using osu.Framework.Input.Handlers.Touch; | ||
using osu.Framework.Localisation; | ||
using osu.Game.Localisation; | ||
|
||
namespace osu.Game.Overlays.Settings.Sections.Input | ||
{ | ||
public partial class TouchSettings : SettingsSubsection | ||
{ | ||
private readonly TouchHandler handler; | ||
|
||
public TouchSettings(TouchHandler handler) | ||
{ | ||
this.handler = handler; | ||
} | ||
|
||
[BackgroundDependencyLoader] | ||
private void load() | ||
{ | ||
Children = new Drawable[] | ||
{ | ||
new SettingsCheckbox | ||
{ | ||
LabelText = CommonStrings.Enabled, | ||
Current = handler.Enabled | ||
}, | ||
}; | ||
} | ||
|
||
public override IEnumerable<LocalisableString> FilterTerms => base.FilterTerms.Concat(new LocalisableString[] { @"touchscreen" }); | ||
|
||
protected override LocalisableString Header => handler.Description; | ||
} | ||
} |