summaryrefslogtreecommitdiffstats
path: root/src/subconscious/graphics/GameWindow.java
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-11-20 19:37:04 +0100
committerNao Pross <naopross@thearcway.org>2018-11-20 19:37:04 +0100
commit65b12271bfd4645526338fb9375dba67fa3f73bc (patch)
treed278a6c3c643b390dd47d3405f5df92a8af538ac /src/subconscious/graphics/GameWindow.java
parentUpdate makefile to make jdb always use port 8000 (diff)
downloadSubconscious-java-65b12271bfd4645526338fb9375dba67fa3f73bc.tar.gz
Subconscious-java-65b12271bfd4645526338fb9375dba67fa3f73bc.zip
Refractor game state change detection / locks
Diffstat (limited to '')
-rw-r--r--src/subconscious/graphics/GameWindow.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/subconscious/graphics/GameWindow.java b/src/subconscious/graphics/GameWindow.java
index 19f8ce1..d7bb655 100644
--- a/src/subconscious/graphics/GameWindow.java
+++ b/src/subconscious/graphics/GameWindow.java
@@ -14,7 +14,6 @@ import javax.swing.JButton;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
-
/* GameWindow
* This class manages the graphical part of the game, such as loading and
* unloading scenes, and the window itself
@@ -101,6 +100,8 @@ public class GameWindow extends JFrame implements ActionListener {
}
}
+
+ this.quit();
}
private void loadScene(Scene scene) {
@@ -168,7 +169,7 @@ public class GameWindow extends JFrame implements ActionListener {
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().startsWith("btn")) {
if (e.getActionCommand().equals("btn-exit")) {
- this.quit();
+ this.game.quit();
return;
}