diff --git a/src/ihm/Main.java b/src/ihm/Main.java index 6f9f30e..8d61526 100644 --- a/src/ihm/Main.java +++ b/src/ihm/Main.java @@ -1,5 +1,7 @@ package ihm; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; import java.net.URL; import java.util.Locale; import java.util.ResourceBundle; @@ -14,6 +16,10 @@ import javafx.stage.WindowEvent; import main.GestionnaireJeu; public class Main extends Application { + GraphicsDevice Gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); + int width = Gd.getDisplayMode().getWidth(); + int height = Gd.getDisplayMode().getHeight(); + @Override public void start(Stage primaryStage) throws Exception { final URL fxmlURL = getClass().getResource("ressources/Menu.fxml"); @@ -22,7 +28,8 @@ public class Main extends Application { Pane root = fxmlLoader.load(); primaryStage.setTitle("Shadow Hunters"); - primaryStage.setScene(new Scene(root)); + primaryStage.setScene(new Scene(root,width,height)); + primaryStage.setMaximized(true); primaryStage.centerOnScreen(); primaryStage.setOnCloseRequest(new EventHandler() { @Override diff --git a/src/ihm/controller/ParametreController.java b/src/ihm/controller/ParametreController.java index 8f2bf6d..db625ab 100644 --- a/src/ihm/controller/ParametreController.java +++ b/src/ihm/controller/ParametreController.java @@ -107,12 +107,13 @@ public class ParametreController implements Initializable { // Pour la couleur du theme - /* + if (clair.isSelected()) { - //Pane root = FXMLLoader.load(getClass().getResource("../ressources/parametre.fxml")); - //root.setStyle("ressources/style/menuLight.css"); + //Pane root = FXMLLoader.load(getClass().getResource("../ressources/menu.fxml")); + //rootPane.setStyle("-fx-background-color: white;"); + } - if (liste != null) { + /*if (liste != null) { for (int i = 0; i < liste.length; i++) { System.out.println(liste[i]);