From 5e1ee06436e415b9ad6603b076f0261dff73bb0a Mon Sep 17 00:00:00 2001 From: Yessine-iut Date: Fri, 8 May 2020 14:10:12 +0200 Subject: [PATCH] Suppression responsive --- src/ihm/Main.java | 6 +++--- src/ihm/controller/ParametreController.java | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ihm/Main.java b/src/ihm/Main.java index 48fd41b..254d7de 100644 --- a/src/ihm/Main.java +++ b/src/ihm/Main.java @@ -16,9 +16,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 { @@ -28,7 +28,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 8a99886..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 @@ -115,10 +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.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);