diff --git a/src/ihm/Main.java b/src/ihm/Main.java index 693c2e4..598e43c 100644 --- a/src/ihm/Main.java +++ b/src/ihm/Main.java @@ -17,9 +17,9 @@ import javafx.stage.WindowEvent; import main.GestionnaireJeu; public class Main extends Application { - GraphicsDevice Gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); + /*GraphicsDevice Gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(); int width = Gd.getDisplayMode().getWidth(); - int height = Gd.getDisplayMode().getHeight(); + int height = Gd.getDisplayMode().getHeight(); */ @Override public void start(Stage primaryStage) throws Exception { @@ -29,7 +29,7 @@ public class Main extends Application { Pane root = fxmlLoader.load(); primaryStage.setTitle("Shadow Hunters"); - primaryStage.setScene(new Scene(root,width,height)); + primaryStage.setScene(new Scene(root)); primaryStage.setMaximized(true); primaryStage.centerOnScreen(); primaryStage.setOnCloseRequest(new EventHandler() { diff --git a/src/ihm/controller/ParametreController.java b/src/ihm/controller/ParametreController.java index e2cff73..52ac4ab 100644 --- a/src/ihm/controller/ParametreController.java +++ b/src/ihm/controller/ParametreController.java @@ -32,10 +32,13 @@ public class ParametreController implements Initializable { @FXML private Slider sliderMusique; + + public static boolean cbMusiqueCoche = false; // verifi si la checbox musical est coche public static boolean cbSonCoche = false; public static boolean cbClair = false; public static double slideValue; + public static String langueChoisi; boolean MusiqueLancee = false; //verifi si la musique a déja été lancé une première fois @@ -67,7 +70,6 @@ public class ParametreController implements Initializable { public void enregistre(MouseEvent mouseEvent) throws IOException, Exception { InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav"); - //Pour la musique if (fileMusique!=null) { @@ -116,9 +118,12 @@ public class ParametreController implements Initializable { if (clair.isSelected()) { //Pane root = FXMLLoader.load(getClass().getResource("../ressources/menu.fxml")); - //rootPane.setStyle("-fx-background-color: white;"); + + rootPane.setStyle("-fx-background-color: white;"); + rootPane.applyCss(); } - + rootPane.setStyle("-fx-background-color: white;"); + rootPane.applyCss(); /*if (liste != null) { for (int i = 0; i < liste.length; i++) { @@ -143,6 +148,7 @@ public class ParametreController implements Initializable { EffetSonore.playSoundEffect(fileSound1); //emet un bruit sur le bouton si les effets sonores sont activés + // Quitter les paramètres final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml"); final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);