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:
commit
5d868c41d4
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user