Click on window close button when WinLoseScreen is shown will perform as 'Quit'

This commit is contained in:
Maxmtg
2013-03-28 20:27:51 +00:00
parent bfeb078723
commit 16a90b3130

View File

@@ -112,7 +112,12 @@ public enum FControl {
Singletons.getView().getFrame().setDefaultCloseOperation(
WindowConstants.DO_NOTHING_ON_CLOSE);
CDock.SINGLETON_INSTANCE.concede();
if (!Singletons.getModel().getGame().isGameOver())
CDock.SINGLETON_INSTANCE.concede();
else {
Singletons.getControl().changeState(FControl.Screens.HOME_SCREEN);
SOverlayUtils.hideOverlay();
}
}
};