summary refs log tree commit diff stats
path: root/src/com/fourisland/fourpuzzle/PuzzleApplication.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/fourisland/fourpuzzle/PuzzleApplication.java')
-rwxr-xr-xsrc/com/fourisland/fourpuzzle/PuzzleApplication.java18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/com/fourisland/fourpuzzle/PuzzleApplication.java b/src/com/fourisland/fourpuzzle/PuzzleApplication.java index f88b0ad..88236f9 100755 --- a/src/com/fourisland/fourpuzzle/PuzzleApplication.java +++ b/src/com/fourisland/fourpuzzle/PuzzleApplication.java
@@ -28,10 +28,8 @@ import org.jdesktop.application.Application;
28 */ 28 */
29public class PuzzleApplication extends Application { 29public class PuzzleApplication extends Application {
30 30
31 public static PuzzleApplication INSTANCE; 31 private static boolean stretchScreen = true;
32 public static boolean debugSpeed = false; 32 private static boolean gameSleep = false;
33 public static boolean stretchScreen = true;
34 public static boolean gameSleep = false;
35 private static JDialog gameDialog = new JDialog(new JFrame(), false); 33 private static JDialog gameDialog = new JDialog(new JFrame(), false);
36 private static Semaphore gameDialogHandler = new Semaphore(1); 34 private static Semaphore gameDialogHandler = new Semaphore(1);
37 35
@@ -101,9 +99,9 @@ public class PuzzleApplication extends Application {
101 { 99 {
102 /* If debug mode is enabled, holding Shift down should put 100 /* If debug mode is enabled, holding Shift down should put
103 * the game into hyperactive mode */ 101 * the game into hyperactive mode */
104 if (INSTANCE.getContext().getResourceMap().getBoolean("debugMode")) 102 if (getInstance().getContext().getResourceMap().getBoolean("debugMode"))
105 { 103 {
106 debugSpeed = true; 104 Interval.setDebugSpeed(true);
107 } 105 }
108 } else if (e.getKeyCode() == KeyEvent.VK_F12) 106 } else if (e.getKeyCode() == KeyEvent.VK_F12)
109 { 107 {
@@ -125,7 +123,7 @@ public class PuzzleApplication extends Application {
125 if (e.getKeyCode() == KeyEvent.VK_SHIFT) 123 if (e.getKeyCode() == KeyEvent.VK_SHIFT)
126 { 124 {
127 // If Shift is let go of, hyperactive mode should end 125 // If Shift is let go of, hyperactive mode should end
128 debugSpeed = false; 126 Interval.setDebugSpeed(false);
129 } else { 127 } else {
130 KeyboardInput.getKey().letGo(); 128 KeyboardInput.getKey().letGo();
131 } 129 }
@@ -140,8 +138,6 @@ public class PuzzleApplication extends Application {
140 @Override 138 @Override
141 protected void startup() 139 protected void startup()
142 { 140 {
143 INSTANCE = this;
144
145 // Create the game form 141 // Create the game form
146 initGameDialog(true); 142 initGameDialog(true);
147 143
@@ -197,10 +193,10 @@ public class PuzzleApplication extends Application {
197 193
198 public String getGamePackage() 194 public String getGamePackage()
199 { 195 {
200 return INSTANCE.getContext().getResourceMap().getString("Application.package"); 196 return getInstance().getContext().getResourceMap().getString("Application.package");
201 } 197 }
202 198
203 public void reportError(Throwable ex) 199 public static void reportError(Throwable ex)
204 { 200 {
205 if ((ex instanceof Exception) && !(ex instanceof RuntimeException)) 201 if ((ex instanceof Exception) && !(ex instanceof RuntimeException))
206 { 202 {