mirror of
https://github.com/ppy/osu
synced 2024-12-14 02:46:27 +00:00
Merge pull request #22385 from peppy/touchscreen-settings-keyword
Fix touch input handler settings not matching search for "touchscreen"
This commit is contained in:
commit
edb9c76edf
@ -556,8 +556,8 @@ namespace osu.Game
|
||||
case JoystickHandler jh:
|
||||
return new JoystickSettings(jh);
|
||||
|
||||
case TouchHandler:
|
||||
return new InputSection.HandlerSection(handler);
|
||||
case TouchHandler th:
|
||||
return new TouchSettings(th);
|
||||
}
|
||||
}
|
||||
|
||||
|
40
osu.Game/Overlays/Settings/Sections/Input/TouchSettings.cs
Normal file
40
osu.Game/Overlays/Settings/Sections/Input/TouchSettings.cs
Normal file
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user