Fix bug tours, choix fonctionnels
This commit is contained in:
@@ -6,8 +6,6 @@ import java.util.ResourceBundle;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.Pane;
|
||||
import main.GestionnaireJeu;
|
||||
|
||||
public class ChoisirBoolean implements Initializable {
|
||||
|
@@ -69,10 +69,15 @@ public class JoueurIHM {
|
||||
public void setZoneJoueur(Pane p) {
|
||||
AnchorPane ap = (AnchorPane) zoneJoueur.getChildren().get(1);
|
||||
ap.getChildren().setAll(p);
|
||||
AnchorPane.getBottomAnchor(p);
|
||||
AnchorPane.getLeftAnchor(p);
|
||||
AnchorPane.getRightAnchor(p);
|
||||
AnchorPane.getTopAnchor(p);
|
||||
|
||||
//ap.prefWidthProperty().bind(ap.widthProperty());
|
||||
//ap.prefHeightProperty().bind(ap.heightProperty());
|
||||
|
||||
AnchorPane.setBottomAnchor(p,0.0);
|
||||
AnchorPane.setLeftAnchor(p,0.0);
|
||||
AnchorPane.setRightAnchor(p,0.0);
|
||||
AnchorPane.setTopAnchor(p,0.0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@@ -35,7 +35,8 @@ public class PlateauController implements Initializable {
|
||||
@FXML private AnchorPane rootPane;
|
||||
@FXML private GridPane gridPaneVie;
|
||||
//@FXML static public GridPane gridPaneLieux;
|
||||
|
||||
|
||||
private ChoisirBoolean cb;
|
||||
|
||||
public static int DICE_SIX = 2;
|
||||
public static int DICE_QUATRE = 1;
|
||||
@@ -268,14 +269,16 @@ public class PlateauController implements Initializable {
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRANCE);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
this.cb = fxmlLoader.getController();
|
||||
JoueurIHM jihm = getJoueurIHM(j);
|
||||
jihm.setZoneJoueur(root);
|
||||
|
||||
}
|
||||
|
||||
public boolean getChoix(Joueur joueur) {
|
||||
JoueurIHM jihm = getJoueurIHM(joueur);
|
||||
boolean result = this.cb.getResult();
|
||||
this.cb = null;
|
||||
jihm.getZoneJoueur().getChildren().setAll();
|
||||
return true;
|
||||
return result;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user