escape on the menu quit the game
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Debucquoy Anthony 2023-05-20 12:45:52 +02:00
parent c7fe7853b4
commit 03beebaeaf

View File

@ -56,6 +56,13 @@ public class Controller extends Application {
}
});
}
else if(root instanceof MenuAccueil){
scene.setOnKeyPressed(event ->{
if(event.getCode()==KeyCode.ESCAPE){
stage.close();
}
});
}
stage.setScene(scene);
stage.setFullScreen(true);