lock fullscreen
Some checks failed
continuous-integration/drone/pr Build is failing
continuous-integration/drone/push Build is failing

This commit is contained in:
Debucquoy Anthony 2023-05-18 19:10:36 +02:00
parent 391d94afbe
commit 012e4ea3ea
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

@ -32,9 +32,6 @@ public class Controller extends Application {
stage.setTitle("ROAD TO MASTER YOU"); stage.setTitle("ROAD TO MASTER YOU");
// Full Screen mode // Full Screen mode
stage.setFullScreen(true);
stage.setFullScreenExitHint("");
primaryStage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH);
root = new MenuAccueil(); root = new MenuAccueil();
@ -44,6 +41,8 @@ public class Controller extends Application {
public static void switchRoot(Parent root){ public static void switchRoot(Parent root){
Scene scene = new Scene(root); Scene scene = new Scene(root);
if(root instanceof GameUI){ if(root instanceof GameUI){
scene.setOnKeyPressed(event ->{ scene.setOnKeyPressed(event ->{
@ -59,6 +58,10 @@ public class Controller extends Application {
}); });
} }
stage.setScene(scene); stage.setScene(scene);
stage.setFullScreen(true);
stage.setFullScreenExitHint("");
stage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH);
} }
public static void main(String[] args) { public static void main(String[] args) {
launch(); launch();