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:
parent
e0da6a2444
commit
0278556947
|
@ -796,8 +796,8 @@ 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) {
|
||||||
startDownloadIndexPos.release();
|
startDownloadIndexPos.released();
|
||||||
startResultPos.release();
|
startResultPos.released();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -739,8 +739,8 @@ 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) {
|
||||||
songScrolling.release();
|
songScrolling.released();
|
||||||
startScorePos.release();
|
startScorePos.released();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1082,6 +1082,7 @@ public class SongMenu extends BasicGameState {
|
||||||
selectOptionsButton.resetHover();
|
selectOptionsButton.resetHover();
|
||||||
hoverOffset.setTime(0);
|
hoverOffset.setTime(0);
|
||||||
hoverIndex = null;
|
hoverIndex = null;
|
||||||
|
songScrolling.released();
|
||||||
startScorePos.setPosition(0);
|
startScorePos.setPosition(0);
|
||||||
beatmapMenuTimer = -1;
|
beatmapMenuTimer = -1;
|
||||||
searchTransitionTimer = SEARCH_TRANSITION_TIME;
|
searchTransitionTimer = SEARCH_TRANSITION_TIME;
|
||||||
|
|
|
@ -113,7 +113,7 @@ public class KineticScrolling {
|
||||||
*/
|
*/
|
||||||
public void setPosition(float newPosition) {
|
public void setPosition(float newPosition) {
|
||||||
pressed();
|
pressed();
|
||||||
release();
|
released();
|
||||||
target = newPosition;
|
target = newPosition;
|
||||||
position = target;
|
position = target;
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ public class KineticScrolling {
|
||||||
/**
|
/**
|
||||||
* Call this when the mouse button has been released.
|
* Call this when the mouse button has been released.
|
||||||
*/
|
*/
|
||||||
public void release() {
|
public void released() {
|
||||||
if (!pressed)
|
if (!pressed)
|
||||||
return;
|
return;
|
||||||
pressed = false;
|
pressed = false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user