aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/Subconscious.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/main/java/Subconscious.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/Subconscious.java b/src/main/java/Subconscious.java
index b63eb23..8ce6b15 100644
--- a/src/main/java/Subconscious.java
+++ b/src/main/java/Subconscious.java
@@ -5,8 +5,11 @@ import java.awt.Graphics;
import java.awt.Image;
import java.awt.Dimension;
+import java.awt.event.MouseListener;
+import java.awt.event.MouseEvent;
-public class Subconscious extends JPanel {
+
+public class Subconscious extends JPanel implements MouseListener {
public static final String TITLE = "Subconscious";
@@ -26,6 +29,7 @@ public class Subconscious extends JPanel {
// TODO remove demo
currentScene = new WorldScene(new Dimension(200, 200), 50);
+ addMouseListener(this);
}
public void createWindow() {
@@ -71,6 +75,16 @@ public class Subconscious extends JPanel {
currentScene.render(g);
}
+ /* listener */
+ public void mouseClicked(MouseEvent e) {
+ int x = e.getX();
+ int y = e.getY();
+ }
+ public void mousePressed(MouseEvent e) {}
+ public void mouseReleased(MouseEvent e) {}
+ public void mouseEntered(MouseEvent e) {}
+ public void mouseExited(MouseEvent e) {}
+
/* main */
public static void main(String args[]) {
Subconscious game = new Subconscious();