diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs
index 246229a794..c1d5ae581e 100644
--- a/osu.Game/OsuGameBase.cs
+++ b/osu.Game/OsuGameBase.cs
@@ -20,6 +20,7 @@ using osu.Game.Graphics.Cursor;
using osu.Game.Online.API;
using osu.Framework.Graphics.Performance;
using osu.Framework.Graphics.Textures;
+using osu.Framework.Input;
using osu.Framework.Logging;
using osu.Game.Audio;
using osu.Game.Database;
@@ -30,6 +31,7 @@ using osu.Game.IO;
using osu.Game.Rulesets;
using osu.Game.Rulesets.Scoring;
using osu.Game.Skinning;
+using OpenTK.Input;
using DebugUtils = osu.Game.Utils.DebugUtils;
namespace osu.Game
@@ -98,6 +100,8 @@ namespace osu.Game
private DatabaseContextFactory contextFactory;
+ protected override UserInputManager CreateUserInputManager() => new OsuUserInputManager();
+
[BackgroundDependencyLoader]
private void load()
{
@@ -267,5 +271,31 @@ namespace osu.Game
return copy;
}
}
+
+ private class OsuUserInputManager : 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 => false;
+ public override bool ChangeFocusOnClick => false;
+ }
+ }
}
}
diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj
index da55726447..cac3459412 100644
--- a/osu.Game/osu.Game.csproj
+++ b/osu.Game/osu.Game.csproj
@@ -18,7 +18,7 @@
-
+