diff options
Diffstat (limited to 'src/com/fourisland/fourpuzzle/window/ChoiceWindow.java')
-rwxr-xr-x | src/com/fourisland/fourpuzzle/window/ChoiceWindow.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/com/fourisland/fourpuzzle/window/ChoiceWindow.java b/src/com/fourisland/fourpuzzle/window/ChoiceWindow.java index 8dce753..2dbd605 100755 --- a/src/com/fourisland/fourpuzzle/window/ChoiceWindow.java +++ b/src/com/fourisland/fourpuzzle/window/ChoiceWindow.java | |||
@@ -61,18 +61,15 @@ public class ChoiceWindow implements Renderable, Inputable { | |||
61 | } | 61 | } |
62 | 62 | ||
63 | private List<String> choices; | 63 | private List<String> choices; |
64 | int numChoices; | ||
65 | boolean center; | 64 | boolean center; |
66 | private int width; | 65 | private int width; |
67 | private int height; | 66 | private int height; |
68 | BufferedImage cacheBase; | 67 | BufferedImage cacheBase; |
69 | int x; | 68 | int x; |
70 | int y; | 69 | int y; |
71 | String clickSound; | ||
72 | private ChoiceWindow(Builder builder) | 70 | private ChoiceWindow(Builder builder) |
73 | { | 71 | { |
74 | this.choices = builder.choices; | 72 | this.choices = builder.choices; |
75 | numChoices = choices.size(); | ||
76 | this.center = builder.center; | 73 | this.center = builder.center; |
77 | 74 | ||
78 | for (String choice : choices) | 75 | for (String choice : choices) |
@@ -211,6 +208,7 @@ public class ChoiceWindow implements Renderable, Inputable { | |||
211 | } | 208 | } |
212 | } | 209 | } |
213 | 210 | ||
211 | Object hasInputLock = new Object(); | ||
214 | Boolean hasInput = false; | 212 | Boolean hasInput = false; |
215 | PauseTimer pt = new PauseTimer(0); | 213 | PauseTimer pt = new PauseTimer(0); |
216 | public void processInput(KeyInput key) | 214 | public void processInput(KeyInput key) |
@@ -231,7 +229,7 @@ public class ChoiceWindow implements Renderable, Inputable { | |||
231 | } | 229 | } |
232 | } else if (key.isActionDown()) | 230 | } else if (key.isActionDown()) |
233 | { | 231 | { |
234 | synchronized (hasInput) | 232 | synchronized (hasInputLock) |
235 | { | 233 | { |
236 | hasInput = true; | 234 | hasInput = true; |
237 | } | 235 | } |
@@ -240,7 +238,7 @@ public class ChoiceWindow implements Renderable, Inputable { | |||
240 | 238 | ||
241 | public boolean hasInput() | 239 | public boolean hasInput() |
242 | { | 240 | { |
243 | synchronized (hasInput) | 241 | synchronized (hasInputLock) |
244 | { | 242 | { |
245 | return hasInput; | 243 | return hasInput; |
246 | } | 244 | } |