1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-12 05:13:08 +08:00

Merge pull request #16330 from peppy/mouse-button-disable-disables-touch

Allow "disable mouse button" setting to apply to touch as well
This commit is contained in:
Dan Balasescu 2022-01-12 17:40:43 +09:00 committed by GitHub
commit 5d868c41d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -127,6 +127,17 @@ namespace osu.Game.Rulesets.UI
return base.Handle(e);
}
protected override bool HandleMouseTouchStateChange(TouchStateChangeEvent e)
{
if (mouseDisabled.Value)
{
// Only propagate positional data when mouse buttons are disabled.
e = new TouchStateChangeEvent(e.State, e.Input, e.Touch, false, e.LastPosition);
}
return base.HandleMouseTouchStateChange(e);
}
#endregion
#region Key Counter Attachment

View File

@ -4,6 +4,7 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Localisation;
namespace osu.Game.Screens.Play.PlayerSettings
{
@ -18,7 +19,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
{
mouseButtonsCheckbox = new PlayerCheckbox
{
LabelText = "Disable mouse buttons"
LabelText = MouseSettingsStrings.DisableMouseButtons
}
};
}