Fixed a small bug with hovering over song buttons.
The left/right arrow keys no longer reset hover data if the start node hasn't changed. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
71f614c90a
commit
62b7ecd648
2
pom.xml
2
pom.xml
|
@ -77,7 +77,7 @@
|
|||
<argument>-Dmain="itdelatrisu.opsu.Opsu"</argument>
|
||||
<argument>-Doutput="opsu-${project.version}-runnable.jar"</argument>
|
||||
<argument>${basedir}/tools/JarSplicePlus.jar</argument>
|
||||
</arguments>
|
||||
</arguments>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
|
|
|
@ -506,7 +506,14 @@ public class SongMenu extends BasicGameState {
|
|||
OsuGroupNode next = focusNode.next;
|
||||
if (next != null) {
|
||||
SoundController.playSound(SoundEffect.MENUCLICK);
|
||||
OsuGroupNode oldStartNode = startNode;
|
||||
float oldHoverOffset = hoverOffset;
|
||||
int oldHoverIndex = hoverIndex;
|
||||
setFocus(next, 0, false);
|
||||
if (startNode == oldStartNode) {
|
||||
hoverOffset = oldHoverOffset;
|
||||
hoverIndex = oldHoverIndex;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Input.KEY_LEFT:
|
||||
|
@ -515,7 +522,14 @@ public class SongMenu extends BasicGameState {
|
|||
OsuGroupNode prev = focusNode.prev;
|
||||
if (prev != null) {
|
||||
SoundController.playSound(SoundEffect.MENUCLICK);
|
||||
OsuGroupNode oldStartNode = startNode;
|
||||
float oldHoverOffset = hoverOffset;
|
||||
int oldHoverIndex = hoverIndex;
|
||||
setFocus(prev, (prev.index == focusNode.index) ? 0 : prev.osuFiles.size() - 1, false);
|
||||
if (startNode == oldStartNode) {
|
||||
hoverOffset = oldHoverOffset;
|
||||
hoverIndex = oldHoverIndex;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case Input.KEY_NEXT:
|
||||
|
|
Loading…
Reference in New Issue
Block a user