diff --git a/src/domaine/properties/langue_fr.properties b/src/domaine/properties/langue_fr.properties index 4b8faf2..56790ca 100644 --- a/src/domaine/properties/langue_fr.properties +++ b/src/domaine/properties/langue_fr.properties @@ -67,5 +67,5 @@ se.soigner=Se soigner mode.claire=Mode clair musique=Musique langue=Langue -parametre=Paramétre +parametre=Paramètre enregistrer=Enregistrer \ No newline at end of file diff --git a/src/ihm/controller/MenuController.java b/src/ihm/controller/MenuController.java index 5db3678..4dc6e02 100644 --- a/src/ihm/controller/MenuController.java +++ b/src/ihm/controller/MenuController.java @@ -16,6 +16,7 @@ import javafx.scene.image.Image; import javafx.scene.image.ImageView; import javafx.scene.input.MouseEvent; import javafx.scene.layout.AnchorPane; +import javafx.scene.layout.Pane; import javafx.stage.Stage; public class MenuController implements Initializable{ @@ -48,6 +49,22 @@ public class MenuController implements Initializable{ appStage.show(); + } + + @FXML + public void ouvrirParametres(MouseEvent mouseEvent) throws IOException{ + InputStream fileSound1 = getClass().getResourceAsStream("/ihm/ressources/musique/BEEP1.wav"); + EffetSonore.playSoundEffect(fileSound1); + + System.out.println("Passage à l'écran des paramètres"); + final URL fxmlURL = getClass().getResource("/ihm/ressources/parametre.fxml"); + final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE); + final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); + Pane pane = fxmlLoader.load(); + + rootPane.getChildren().setAll(pane); + + } public void afficherRegle(MouseEvent mouseEvent) { diff --git a/src/ihm/ressources/Menu.fxml b/src/ihm/ressources/Menu.fxml index 857a225..c60402b 100644 --- a/src/ihm/ressources/Menu.fxml +++ b/src/ihm/ressources/Menu.fxml @@ -9,11 +9,11 @@ - + - + +