1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Revert right click handling for now

This commit is contained in:
Dean Herbert 2019-06-13 19:10:57 +09:00
parent d744c900c2
commit ee9d82f0fe
2 changed files with 31 additions and 1 deletions

View File

@ -12,6 +12,7 @@ using osu.Framework.Bindables;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
using osu.Framework.Input;
using osu.Framework.IO.Stores;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
@ -20,6 +21,7 @@ using osu.Game.Online.API.Requests;
using osu.Game.Rulesets;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.IPC;
using osuTK.Input;
namespace osu.Game.Tournament
{
@ -250,5 +252,33 @@ namespace osu.Game.Tournament
}));
}
}
protected override UserInputManager CreateUserInputManager() => new TournamentInputManager();
private class TournamentInputManager : UserInputManager
{
protected override MouseButtonEventManager CreateButtonManagerFor(MouseButton button)
{
switch (button)
{
case MouseButton.Right:
return new RightMouseManager(button);
}
return base.CreateButtonManagerFor(button);
}
private class RightMouseManager : MouseButtonEventManager
{
public RightMouseManager(MouseButton button)
: base(button)
{
}
public override bool EnableDrag => true; // allow right-mouse dragging for absolute scroll in scroll containers.
public override bool EnableClick => true;
public override bool ChangeFocusOnClick => false;
}
}
}
}

View File

@ -311,7 +311,7 @@ namespace osu.Game
}
public override bool EnableDrag => true; // allow right-mouse dragging for absolute scroll in scroll containers.
public override bool EnableClick => true;
public override bool EnableClick => false;
public override bool ChangeFocusOnClick => false;
}
}