From a2bc3f1dd41abfa03dfe67c67a42f4bde0e48e49 Mon Sep 17 00:00:00 2001 From: Yessine Ben El Bey Date: Thu, 7 May 2020 14:46:01 +0200 Subject: [PATCH] =?UTF-8?q?Param=C3=A8tre=20mettre=20les=20cases=20coch?= =?UTF-8?q?=C3=A9s=20et=20controllerPause=20mettre=20les=20cases=20coch?= =?UTF-8?q?=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ihm/controller/ParametreController.java | 8 ++++++++ src/ihm/controller/PauseController.java | 10 +++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/ihm/controller/ParametreController.java b/src/ihm/controller/ParametreController.java index 81eeadd..8f2bf6d 100644 --- a/src/ihm/controller/ParametreController.java +++ b/src/ihm/controller/ParametreController.java @@ -30,6 +30,8 @@ public class ParametreController implements Initializable { private ComboBox langues; public static boolean cbMusiqueCoche = false; // verifi si la checbox musical est coche public static boolean cbSonCoche = false; + public static boolean cbClair = false; + boolean MusiqueLancee = false; //verifi si la musique a déja été lancé une première fois String filepathMusique = "/ihm/ressources/musique/The_Red_Fox_Tavern.wav"; // lien vers la musique : https://www.youtube.com/watch?v=LBpKUIyOHdo @@ -43,6 +45,12 @@ public class ParametreController implements Initializable { @Override public void initialize(URL arg0, ResourceBundle arg1) { + cmusique.setSelected(cbMusiqueCoche); + cbEffetSonore.setSelected(cbSonCoche); + clair.setSelected(cbClair); + + + langues.getItems().add("Anglais"); langues.getItems().add("Allemand"); langues.getItems().add("Espagnol"); diff --git a/src/ihm/controller/PauseController.java b/src/ihm/controller/PauseController.java index c6b2a25..51cb9c4 100644 --- a/src/ihm/controller/PauseController.java +++ b/src/ihm/controller/PauseController.java @@ -36,14 +36,10 @@ public class PauseController implements Initializable { @Override public void initialize(URL arg0, ResourceBundle arg1) { - if (MusiqueLancee == true) { - cbMusique.setSelected(true); - } - - if (SonLance == true) { - cbEffet.setSelected(true); - } + cbMusique.setSelected(ParametreController.cbMusiqueCoche); + cbEffet.setSelected(ParametreController.cbSonCoche); + } @FXML