Amélioration
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package fr.monkhanny.dorfromantik.game;
|
||||
|
||||
import fr.monkhanny.dorfromantik.Options;
|
||||
import fr.monkhanny.dorfromantik.listeners.EscapeMenuCloseListener;
|
||||
import fr.monkhanny.dorfromantik.listeners.GameQuitButtonListener;
|
||||
import fr.monkhanny.dorfromantik.listeners.GameResumeButtonListener;
|
||||
import fr.monkhanny.dorfromantik.listeners.GameSettingsButtonListener;
|
||||
@@ -23,6 +24,7 @@ public class PauseGame extends KeyAdapter {
|
||||
this.resumeButtonListener = new GameResumeButtonListener(this.escapeMenu);
|
||||
this.quitButtonListener = new GameQuitButtonListener();; // Initialisé après la création de escapeMenu
|
||||
this.settingsButtonListener = new GameSettingsButtonListener(gameFrame, this.escapeMenu); // Passer escapeMenu correctement
|
||||
this.escapeMenu.addWindowListener(new EscapeMenuCloseListener());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -0,0 +1,13 @@
|
||||
package fr.monkhanny.dorfromantik.listeners;
|
||||
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
|
||||
import fr.monkhanny.dorfromantik.Options;
|
||||
|
||||
public class EscapeMenuCloseListener extends WindowAdapter {
|
||||
@Override
|
||||
public void windowClosing(WindowEvent e) {
|
||||
Options.isPaused = false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user