Implemented Ctrl+Enter in song menu (play with "auto" mod).
Also made 'Esc' during gameplay return to the song menu immediately if the "auto" mod is active. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
78aabaa43e
commit
38b3621c29
|
@ -617,10 +617,14 @@ public class Game extends BasicGameState {
|
|||
|
||||
switch (key) {
|
||||
case Input.KEY_ESCAPE:
|
||||
// "auto" mod: go back to song menu
|
||||
if (GameMod.AUTO.isActive()) {
|
||||
game.closeRequested();
|
||||
break;
|
||||
}
|
||||
|
||||
// pause game
|
||||
if (pauseTime < 0 && breakTime <= 0 &&
|
||||
trackPosition >= osu.objects[0].getTime() &&
|
||||
!GameMod.AUTO.isActive()) {
|
||||
if (pauseTime < 0 && breakTime <= 0 && trackPosition >= osu.objects[0].getTime()) {
|
||||
pausedMouseX = input.getMouseX();
|
||||
pausedMouseY = input.getMouseY();
|
||||
pausePulse = 0f;
|
||||
|
|
|
@ -21,6 +21,7 @@ package itdelatrisu.opsu.states;
|
|||
import java.util.Stack;
|
||||
|
||||
import itdelatrisu.opsu.GameImage;
|
||||
import itdelatrisu.opsu.GameMod;
|
||||
import itdelatrisu.opsu.MenuButton;
|
||||
import itdelatrisu.opsu.Opsu;
|
||||
import itdelatrisu.opsu.OsuFile;
|
||||
|
@ -545,8 +546,14 @@ public class SongMenu extends BasicGameState {
|
|||
Utils.takeScreenShot();
|
||||
break;
|
||||
case Input.KEY_ENTER:
|
||||
if (focusNode != null)
|
||||
startGame();
|
||||
if (focusNode == null)
|
||||
break;
|
||||
if (input.isKeyDown(Input.KEY_RCONTROL) || input.isKeyDown(Input.KEY_LCONTROL)) {
|
||||
// turn on "auto" mod
|
||||
if (!GameMod.AUTO.isActive())
|
||||
GameMod.AUTO.toggle(true);
|
||||
}
|
||||
startGame();
|
||||
break;
|
||||
case Input.KEY_DOWN:
|
||||
changeIndex(1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user