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.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import ihm.EffetSonore;
|
import ihm.EffetSonore;
|
||||||
|
@ -117,21 +117,10 @@ public class PauseController implements Initializable {
|
|||||||
EffetSonore.playSoundEffect(fileSound1);
|
EffetSonore.playSoundEffect(fileSound1);
|
||||||
GestionnaireJeu.endGame();
|
GestionnaireJeu.endGame();
|
||||||
System.err.println("Fin de partie");
|
System.err.println("Fin de partie");
|
||||||
|
PlateauController platcontr = GestionnaireJeu.pc;
|
||||||
Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow();
|
Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow();
|
||||||
appStage.close();
|
appStage.close();
|
||||||
|
platcontr.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();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,6 @@ public class PlateauController implements Initializable {
|
|||||||
@FXML private GridPane gridPaneVie;
|
@FXML private GridPane gridPaneVie;
|
||||||
@FXML public GridPane gridPaneLieux;
|
@FXML public GridPane gridPaneLieux;
|
||||||
|
|
||||||
|
|
||||||
private ChoisirBoolean cb;
|
private ChoisirBoolean cb;
|
||||||
private ChoisirEquipement ce;
|
private ChoisirEquipement ce;
|
||||||
private ChoisirJoueur cj;
|
private ChoisirJoueur cj;
|
||||||
@ -465,6 +464,16 @@ public class PlateauController implements Initializable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 RessourceLoader ressourceLoader;
|
||||||
|
|
||||||
private static Plateau plateau;
|
private static Plateau plateau;
|
||||||
private static PlateauController pc;
|
public static PlateauController pc;
|
||||||
|
|
||||||
private GestionnaireJeu() {}
|
private GestionnaireJeu() {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user