Check mouse button before firing events for kinetic scrolling.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han 2015-09-20 11:38:46 -04:00
parent c69f34adc3
commit 4acd3cda02
2 changed files with 12 additions and 0 deletions

View File

@ -799,6 +799,10 @@ public class DownloadsMenu extends BasicGameState {
@Override @Override
public void mouseReleased(int button, int x, int y) { public void mouseReleased(int button, int x, int y) {
// check mouse button
if (button == Input.MOUSE_MIDDLE_BUTTON)
return;
startDownloadIndexPos.released(); startDownloadIndexPos.released();
startResultPos.released(); startResultPos.released();
} }

View File

@ -735,6 +735,10 @@ public class SongMenu extends BasicGameState {
@Override @Override
public void mousePressed(int button, int x, int y) { public void mousePressed(int button, int x, int y) {
// check mouse button
if (button == Input.MOUSE_MIDDLE_BUTTON)
return;
if (isScrollingToFocusNode) if (isScrollingToFocusNode)
return; return;
@ -744,6 +748,10 @@ public class SongMenu extends BasicGameState {
@Override @Override
public void mouseReleased(int button, int x, int y) { public void mouseReleased(int button, int x, int y) {
// check mouse button
if (button == Input.MOUSE_MIDDLE_BUTTON)
return;
if (isScrollingToFocusNode) if (isScrollingToFocusNode)
return; return;