Skip to content

Commit

Permalink
reset after closing window
Browse files Browse the repository at this point in the history
  • Loading branch information
AGENTUR\cee committed Jan 5, 2018
1 parent 0555ab0 commit 922ff13
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions src/rushhour/Window.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import java.awt.image.ImageObserver;
import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -44,6 +46,51 @@ public Window(String title, Map map) throws HeadlessException {
this.setResizable(false);
loadMap(map);
Window = this;

this.addWindowListener(new WindowListener() {

@Override
public void windowOpened(WindowEvent e) {
// TODO Auto-generated method stub

}

@Override
public void windowIconified(WindowEvent e) {
// TODO Auto-generated method stub

}

@Override
public void windowDeiconified(WindowEvent e) {
// TODO Auto-generated method stub

}

@Override
public void windowDeactivated(WindowEvent e) {
// TODO Auto-generated method stub

}

@Override
public void windowClosing(WindowEvent e) {
map.reset();
}

@Override
public void windowClosed(WindowEvent e) {
// TODO Auto-generated method stub

}

@Override
public void windowActivated(WindowEvent e) {
// TODO Auto-generated method stub

}
});

this.addMouseListener(new MouseListener() {

@Override
Expand Down

0 comments on commit 922ff13

Please sign in to comment.