From 4acd3cda02f1ed8b62acebcf1912bec9cf5c092b Mon Sep 17 00:00:00 2001 From: Jeffrey Han Date: Sun, 20 Sep 2015 11:38:46 -0400 Subject: [PATCH] Check mouse button before firing events for kinetic scrolling. Signed-off-by: Jeffrey Han --- src/itdelatrisu/opsu/states/DownloadsMenu.java | 4 ++++ src/itdelatrisu/opsu/states/SongMenu.java | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/itdelatrisu/opsu/states/DownloadsMenu.java b/src/itdelatrisu/opsu/states/DownloadsMenu.java index bf673441..3d7f8917 100644 --- a/src/itdelatrisu/opsu/states/DownloadsMenu.java +++ b/src/itdelatrisu/opsu/states/DownloadsMenu.java @@ -799,6 +799,10 @@ public class DownloadsMenu extends BasicGameState { @Override public void mouseReleased(int button, int x, int y) { + // check mouse button + if (button == Input.MOUSE_MIDDLE_BUTTON) + return; + startDownloadIndexPos.released(); startResultPos.released(); } diff --git a/src/itdelatrisu/opsu/states/SongMenu.java b/src/itdelatrisu/opsu/states/SongMenu.java index 435e42cf..91f7a997 100644 --- a/src/itdelatrisu/opsu/states/SongMenu.java +++ b/src/itdelatrisu/opsu/states/SongMenu.java @@ -735,6 +735,10 @@ public class SongMenu extends BasicGameState { @Override public void mousePressed(int button, int x, int y) { + // check mouse button + if (button == Input.MOUSE_MIDDLE_BUTTON) + return; + if (isScrollingToFocusNode) return; @@ -744,6 +748,10 @@ public class SongMenu extends BasicGameState { @Override public void mouseReleased(int button, int x, int y) { + // check mouse button + if (button == Input.MOUSE_MIDDLE_BUTTON) + return; + if (isScrollingToFocusNode) return;