1
0
mirror of https://github.com/ppy/osu.git synced 2024-05-14 14:40:23 +08:00

Add touch input settings to android

Also updates touch settings so the touch handler can't be disabled on mobile.
This commit is contained in:
Susko3 2023-11-09 13:22:49 +01:00
parent 67dc3aa5b7
commit 51cf85a9ab
2 changed files with 12 additions and 4 deletions

View File

@ -11,6 +11,7 @@ using osu.Framework.Input.Handlers;
using osu.Framework.Platform;
using osu.Game;
using osu.Game.Overlays.Settings;
using osu.Game.Overlays.Settings.Sections.Input;
using osu.Game.Updater;
using osu.Game.Utils;
@ -97,6 +98,9 @@ namespace osu.Android
case AndroidJoystickHandler jh:
return new AndroidJoystickSettings(jh);
case AndroidTouchHandler th:
return new TouchSettings(th);
default:
return base.CreateSettingsSubsectionFor(handler);
}

View File

@ -3,6 +3,7 @@
using System.Collections.Generic;
using System.Linq;
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Input.Handlers;
using osu.Framework.Localisation;
@ -28,11 +29,14 @@ namespace osu.Game.Overlays.Settings.Sections.Input
[BackgroundDependencyLoader]
private void load(OsuConfigManager osuConfig)
{
Add(new SettingsCheckbox
if (!RuntimeInfo.IsMobile) // don't allow disabling the only input method (touch) on mobile.
{
LabelText = CommonStrings.Enabled,
Current = handler.Enabled
});
Add(new SettingsCheckbox
{
LabelText = CommonStrings.Enabled,
Current = handler.Enabled
});
}
Add(new SettingsCheckbox
{