lock fullscreen
This commit is contained in:
parent
391d94afbe
commit
012e4ea3ea
@ -32,9 +32,6 @@ public class Controller extends Application {
|
||||
stage.setTitle("ROAD TO MASTER YOU");
|
||||
|
||||
// Full Screen mode
|
||||
stage.setFullScreen(true);
|
||||
stage.setFullScreenExitHint("");
|
||||
primaryStage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH);
|
||||
|
||||
root = new MenuAccueil();
|
||||
|
||||
@ -44,6 +41,8 @@ public class Controller extends Application {
|
||||
|
||||
|
||||
public static void switchRoot(Parent root){
|
||||
|
||||
|
||||
Scene scene = new Scene(root);
|
||||
if(root instanceof GameUI){
|
||||
scene.setOnKeyPressed(event ->{
|
||||
@ -59,6 +58,10 @@ public class Controller extends Application {
|
||||
});
|
||||
}
|
||||
stage.setScene(scene);
|
||||
|
||||
stage.setFullScreen(true);
|
||||
stage.setFullScreenExitHint("");
|
||||
stage.setFullScreenExitKeyCombination(KeyCombination.NO_MATCH);
|
||||
}
|
||||
public static void main(String[] args) {
|
||||
launch();
|
||||
|
Loading…
Reference in New Issue
Block a user