Bouton retour joueur
This commit is contained in:
parent
fdf6fed74d
commit
ce4a6bfeac
@ -91,6 +91,8 @@ public class ParametreController implements Initializable {
|
|||||||
System.out.println(EffetSonore.isSoundOK());
|
System.out.println(EffetSonore.isSoundOK());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Pour la couleur du theme
|
// Pour la couleur du theme
|
||||||
|
|
||||||
@ -124,8 +126,9 @@ public class ParametreController implements Initializable {
|
|||||||
EffetSonore.playSoundEffect(fileSound1); //emet un bruit sur le bouton si les effets sonores sont activés
|
EffetSonore.playSoundEffect(fileSound1); //emet un bruit sur le bouton si les effets sonores sont activés
|
||||||
|
|
||||||
// Quitter les paramètres
|
// Quitter les paramètres
|
||||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
||||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||||
|
|
||||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||||
Pane pane = fxmlLoader.load();
|
Pane pane = fxmlLoader.load();
|
||||||
|
|
||||||
|
@ -99,10 +99,11 @@ public class PauseController implements Initializable {
|
|||||||
Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow();
|
Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow();
|
||||||
appStage.close();
|
appStage.close();
|
||||||
|
|
||||||
/* final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
/* final URL fxmlURL = getClass().getResource("/ihm/ressources/Menu.fxml");
|
||||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
|
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
|
||||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||||
AnchorPane root = fxmlLoader.load(); */
|
AnchorPane root = fxmlLoader.load(); */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ public class PlateauController implements Initializable {
|
|||||||
@FXML private AnchorPane rootPane;
|
@FXML private AnchorPane rootPane;
|
||||||
@FXML private GridPane gridPaneVie;
|
@FXML private GridPane gridPaneVie;
|
||||||
@FXML public GridPane gridPaneLieux;
|
@FXML public GridPane gridPaneLieux;
|
||||||
|
|
||||||
|
|
||||||
private ChoisirBoolean cb;
|
private ChoisirBoolean cb;
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ public class PlateauController implements Initializable {
|
|||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
//System.out.println("Création du plateau ...");
|
//System.out.println("Création du plateau ...");
|
||||||
|
|
||||||
this.joueursIHM = new ArrayList<JoueurIHM>();
|
this.joueursIHM = new ArrayList<JoueurIHM>();
|
||||||
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
|
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
|
||||||
Map<Integer, Joueur> map = gj.getMapJoueurs();
|
Map<Integer, Joueur> map = gj.getMapJoueurs();
|
||||||
@ -61,6 +62,7 @@ public class PlateauController implements Initializable {
|
|||||||
Pane p = (Pane) gridPaneVie.getChildren().get(i);
|
Pane p = (Pane) gridPaneVie.getChildren().get(i);
|
||||||
Label l = (Label) p.getChildren().get(1);
|
Label l = (Label) p.getChildren().get(1);
|
||||||
l.setText(i+"");
|
l.setText(i+"");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i : map.keySet()) {
|
for(int i : map.keySet()) {
|
||||||
@ -159,6 +161,7 @@ public class PlateauController implements Initializable {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private Pane getPaneJoueur(int i) {
|
private Pane getPaneJoueur(int i) {
|
||||||
|
|
||||||
System.out.println("i "+i);
|
System.out.println("i "+i);
|
||||||
|
@ -23,6 +23,7 @@ import javafx.scene.control.TextField;
|
|||||||
import javafx.scene.input.MouseEvent;
|
import javafx.scene.input.MouseEvent;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.scene.layout.HBox;
|
import javafx.scene.layout.HBox;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
import javafx.stage.Stage;
|
import javafx.stage.Stage;
|
||||||
import main.Configuration;
|
import main.Configuration;
|
||||||
import main.GestionnaireJeu;
|
import main.GestionnaireJeu;
|
||||||
@ -213,4 +214,14 @@ public class PlayersController implements Initializable{
|
|||||||
}else
|
}else
|
||||||
enleverJoueur(indice);
|
enleverJoueur(indice);
|
||||||
}
|
}
|
||||||
|
@FXML
|
||||||
|
public void retour(MouseEvent me) throws IOException {
|
||||||
|
final URL fxmlURL = getClass().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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,6 +164,14 @@
|
|||||||
<Insets top="20.0" />
|
<Insets top="20.0" />
|
||||||
</VBox.margin>
|
</VBox.margin>
|
||||||
</Button>
|
</Button>
|
||||||
|
<Button layoutX="283.0" layoutY="379.0" mnemonicParsing="false" onMouseClicked="#retour" prefHeight="55.0" prefWidth="247.0" styleClass="bouton" stylesheets="@style/menu.css" text="retour">
|
||||||
|
<font>
|
||||||
|
<Font size="24.0" />
|
||||||
|
</font>
|
||||||
|
<VBox.margin>
|
||||||
|
<Insets top="20.0" />
|
||||||
|
</VBox.margin>
|
||||||
|
</Button>
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
</center>
|
</center>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user