diff options
Diffstat (limited to 'src/com/fourisland/fourpuzzle/PuzzleApplication.java')
-rwxr-xr-x | src/com/fourisland/fourpuzzle/PuzzleApplication.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/com/fourisland/fourpuzzle/PuzzleApplication.java b/src/com/fourisland/fourpuzzle/PuzzleApplication.java index 36dda19..f88b0ad 100755 --- a/src/com/fourisland/fourpuzzle/PuzzleApplication.java +++ b/src/com/fourisland/fourpuzzle/PuzzleApplication.java | |||
@@ -5,6 +5,7 @@ | |||
5 | package com.fourisland.fourpuzzle; | 5 | package com.fourisland.fourpuzzle; |
6 | 6 | ||
7 | import com.fourisland.fourpuzzle.database.Database; | 7 | import com.fourisland.fourpuzzle.database.Database; |
8 | import com.fourisland.fourpuzzle.database.Transitions; | ||
8 | import com.fourisland.fourpuzzle.database.Vocabulary; | 9 | import com.fourisland.fourpuzzle.database.Vocabulary; |
9 | import com.fourisland.fourpuzzle.gamestate.TitleScreenGameState; | 10 | import com.fourisland.fourpuzzle.gamestate.TitleScreenGameState; |
10 | import com.fourisland.fourpuzzle.util.Interval; | 11 | import com.fourisland.fourpuzzle.util.Interval; |
@@ -104,6 +105,14 @@ public class PuzzleApplication extends Application { | |||
104 | { | 105 | { |
105 | debugSpeed = true; | 106 | debugSpeed = true; |
106 | } | 107 | } |
108 | } else if (e.getKeyCode() == KeyEvent.VK_F12) | ||
109 | { | ||
110 | try { | ||
111 | /* If the user presses F12, return to the title screen */ | ||
112 | Display.transition(Database.getTransition(Transitions.Generic), new TitleScreenGameState(), false); | ||
113 | } catch (InterruptedException ex) { | ||
114 | Thread.currentThread().interrupt(); | ||
115 | } | ||
107 | } else { | 116 | } else { |
108 | // If anything else is pressed, let the GameState handle it | 117 | // If anything else is pressed, let the GameState handle it |
109 | KeyboardInput.getKey().keyInput(e); | 118 | KeyboardInput.getKey().keyInput(e); |