From ff8ad30127b78091a63dab2cfc1c2597e6af9394 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 22 Aug 2017 14:42:49 +0900 Subject: [PATCH] Add support for binding mousewheel actions --- osu.Game/Overlays/KeyBinding/KeyBindingRow.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs b/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs index a3361743a1..eb7d528897 100644 --- a/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs +++ b/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs @@ -172,6 +172,21 @@ protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) return base.OnMouseUp(state, args); } + protected override bool OnWheel(InputState state) + { + if (HasFocus) + { + if (bindTarget.IsHovered) + { + bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(state)); + finalise(); + return true; + } + } + + return base.OnWheel(state); + } + protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) { if (!HasFocus)