Fixed a minor kinetic scrolling bug in the song menu.

Added a missing "songScrolling.released()" call upon entering the song menu as the pressed state wasn't being cleared (causing an issue with the scroll wheel upon re-entering the state).

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han 2015-09-16 15:42:00 -04:00
parent e0da6a2444
commit 0278556947
3 changed files with 7 additions and 6 deletions

View File

@ -796,8 +796,8 @@ public class DownloadsMenu extends BasicGameState {
@Override
public void mouseReleased(int button, int x, int y) {
startDownloadIndexPos.release();
startResultPos.release();
startDownloadIndexPos.released();
startResultPos.released();
}
@Override

View File

@ -739,8 +739,8 @@ public class SongMenu extends BasicGameState {
@Override
public void mouseReleased(int button, int x, int y) {
songScrolling.release();
startScorePos.release();
songScrolling.released();
startScorePos.released();
}
@Override
@ -1082,6 +1082,7 @@ public class SongMenu extends BasicGameState {
selectOptionsButton.resetHover();
hoverOffset.setTime(0);
hoverIndex = null;
songScrolling.released();
startScorePos.setPosition(0);
beatmapMenuTimer = -1;
searchTransitionTimer = SEARCH_TRANSITION_TIME;

View File

@ -113,7 +113,7 @@ public class KineticScrolling {
*/
public void setPosition(float newPosition) {
pressed();
release();
released();
target = newPosition;
position = target;
}
@ -139,7 +139,7 @@ public class KineticScrolling {
/**
* Call this when the mouse button has been released.
*/
public void release() {
public void released() {
if (!pressed)
return;
pressed = false;