aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/esieequest/view/app/UserInterface.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/esieequest/view/app/UserInterface.java b/src/esieequest/view/app/UserInterface.java
index e0121a2..0f426bd 100644
--- a/src/esieequest/view/app/UserInterface.java
+++ b/src/esieequest/view/app/UserInterface.java
@@ -103,7 +103,7 @@ abstract class UserInterface implements Viewable, ActionListener {
103 private JButton leftButton; 103 private JButton leftButton;
104 private JButton rightButton; 104 private JButton rightButton;
105 105
106 private final Timer timer; 106 private Timer timer;
107 private TimerTask timerTask; 107 private TimerTask timerTask;
108 private boolean scenePlaying; 108 private boolean scenePlaying;
109 109
@@ -119,7 +119,6 @@ abstract class UserInterface implements Viewable, ActionListener {
119 this.bindKeys(); 119 this.bindKeys();
120 this.bindFocus(); 120 this.bindFocus();
121 this.setControlsState(false); 121 this.setControlsState(false);
122 this.timer = new Timer();
123 this.muted = false; 122 this.muted = false;
124 } 123 }
125 124
@@ -625,6 +624,11 @@ abstract class UserInterface implements Viewable, ActionListener {
625 UserInterface.this.scenePlaying = false; 624 UserInterface.this.scenePlaying = false;
626 } 625 }
627 }; 626 };
627
628 if (this.timer != null) {
629 this.timer.cancel();
630 }
631 this.timer = new Timer();
628 this.timer.schedule(this.timerTask, scene.getDuration()); 632 this.timer.schedule(this.timerTask, scene.getDuration());
629 } 633 }
630 634