mirror of
https://github.com/ppy/osu.git
synced 2025-02-07 17:03:22 +08:00
Fix right mouse not working at song select for some things
This commit is contained in:
parent
0b9c41c94e
commit
fa452bcce1
@ -1176,11 +1176,10 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
protected override bool IsDragging => base.IsDragging || absoluteScrolling;
|
protected override bool IsDragging => base.IsDragging || absoluteScrolling;
|
||||||
|
|
||||||
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
protected override bool OnMouseDown(MouseDownEvent e)
|
||||||
{
|
{
|
||||||
switch (e.Action)
|
if (e.Button == MouseButton.Right)
|
||||||
{
|
{
|
||||||
case GlobalAction.AbsoluteScrollSongList:
|
|
||||||
// The default binding for absolute scroll is right mouse button.
|
// The default binding for absolute scroll is right mouse button.
|
||||||
// To avoid conflicts with context menus, disallow absolute scroll completely if it looks like things will fall over.
|
// To avoid conflicts with context menus, disallow absolute scroll completely if it looks like things will fall over.
|
||||||
if (e.CurrentState.Mouse.Buttons.Contains(MouseButton.Right)
|
if (e.CurrentState.Mouse.Buttons.Contains(MouseButton.Right)
|
||||||
@ -1192,17 +1191,22 @@ namespace osu.Game.Screens.Select
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return base.OnMouseDown(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnMouseUp(MouseUpEvent e)
|
||||||
|
{
|
||||||
|
absoluteScrolling = false;
|
||||||
|
base.OnMouseUp(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
|
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
|
||||||
{
|
{
|
||||||
switch (e.Action)
|
|
||||||
{
|
|
||||||
case GlobalAction.AbsoluteScrollSongList:
|
|
||||||
absoluteScrolling = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnMouseMove(MouseMoveEvent e)
|
protected override bool OnMouseMove(MouseMoveEvent e)
|
||||||
|
Loading…
Reference in New Issue
Block a user