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");
|
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();
|
||||||
|
Loading…
Reference in New Issue
Block a user