mirror of https://github.com/ppy/osu
Add support for binding mousewheel actions
This commit is contained in:
parent
3254e16e9c
commit
ff8ad30127
|
@ -172,6 +172,21 @@ protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||||
return base.OnMouseUp(state, 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)
|
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args)
|
||||||
{
|
{
|
||||||
if (!HasFocus)
|
if (!HasFocus)
|
||||||
|
|
Loading…
Reference in New Issue