1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-31 05:13:22 +08:00

Fix right mouse not working at song select for some things

This commit is contained in:
Dean Herbert 2025-01-20 02:51:43 +09:00
parent 0b9c41c94e
commit fa452bcce1
No known key found for this signature in database

View File

@ -1176,11 +1176,10 @@ namespace osu.Game.Screens.Select
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.
// 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)
@ -1192,17 +1191,22 @@ namespace osu.Game.Screens.Select
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;
}
public void OnReleased(KeyBindingReleaseEvent<GlobalAction> e)
{
switch (e.Action)
{
case GlobalAction.AbsoluteScrollSongList:
absoluteScrolling = false;
break;
}
}
protected override bool OnMouseMove(MouseMoveEvent e)