impl bouton quitter jeu
This commit is contained in:
parent
0f0dc65d3e
commit
7a689e6007
@ -3,7 +3,6 @@ package ihm.controller;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import ihm.EffetSonore;
|
||||
|
@ -117,21 +117,10 @@ public class PauseController implements Initializable {
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
GestionnaireJeu.endGame();
|
||||
System.err.println("Fin de partie");
|
||||
PlateauController platcontr = GestionnaireJeu.pc;
|
||||
Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow();
|
||||
appStage.close();
|
||||
|
||||
/*
|
||||
* final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
||||
* final ResourceBundle bundle =
|
||||
* ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH); final
|
||||
* FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle); AnchorPane root =
|
||||
* fxmlLoader.load();
|
||||
*/
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
AnchorPane root = fxmlLoader.load();
|
||||
platcontr.close();
|
||||
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,6 @@ public class PlateauController implements Initializable {
|
||||
@FXML private GridPane gridPaneVie;
|
||||
@FXML public GridPane gridPaneLieux;
|
||||
|
||||
|
||||
private ChoisirBoolean cb;
|
||||
private ChoisirEquipement ce;
|
||||
private ChoisirJoueur cj;
|
||||
@ -464,6 +463,16 @@ public class PlateauController implements Initializable {
|
||||
jihm.retirerEquipement(e);
|
||||
|
||||
}
|
||||
|
||||
public void close () throws IOException {
|
||||
final URL fxmlURL = PlateauController.class.getResource("/ihm/ressources/Menu.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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ public class GestionnaireJeu {
|
||||
private RessourceLoader ressourceLoader;
|
||||
|
||||
private static Plateau plateau;
|
||||
private static PlateauController pc;
|
||||
public static PlateauController pc;
|
||||
|
||||
private GestionnaireJeu() {}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user