code choix joueur
This commit is contained in:
parent
0afb086995
commit
fd6904f58a
@ -1,28 +1,74 @@
|
|||||||
package ihm.controller;
|
package ihm.controller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.CheckBox;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
|
import javafx.scene.control.TextInputControl;
|
||||||
import javafx.scene.input.MouseEvent;
|
import javafx.scene.input.MouseEvent;
|
||||||
import javafx.scene.layout.BorderPane;
|
import javafx.scene.layout.BorderPane;
|
||||||
|
import javafx.scene.layout.HBox;
|
||||||
import javafx.scene.layout.Pane;
|
import javafx.scene.layout.Pane;
|
||||||
|
import javafx.scene.layout.VBox;
|
||||||
|
|
||||||
public class PlayersController implements Initializable{
|
public class PlayersController implements Initializable{
|
||||||
@FXML
|
|
||||||
private BorderPane rootPane;
|
@FXML private BorderPane rootPane;
|
||||||
@FXML
|
@FXML private TextField tf;
|
||||||
private TextField tf;
|
@FXML private VBox vb1;
|
||||||
|
@FXML private VBox vb2;
|
||||||
|
private HBox hb10;
|
||||||
|
private HBox hb11;
|
||||||
|
private HBox hb12;
|
||||||
|
private HBox hb13;
|
||||||
|
private TextField tf0;
|
||||||
|
private Button btn;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
tf.setEditable(false);
|
for(int i=0;i<4;i++) {
|
||||||
|
hb10=(HBox) vb1.getChildren().get(i);
|
||||||
|
tf0=(TextField) hb10.getChildren().get(0);
|
||||||
|
|
||||||
|
tf0.setEditable(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
for(int i=0;i<4;i++) {
|
||||||
|
hb10=(HBox) vb1.getChildren().get(i);
|
||||||
|
tf0=(TextField) hb10.getChildren().get(0);
|
||||||
|
btn=(Button) hb10.getChildren().get(1);
|
||||||
|
btn.setOnAction((e) -> {
|
||||||
|
tf0.setEditable(true);});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//liaison.put( (Button)vb11.getChildren().get(i), maListe);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Partie2 pas prendre en compte pour le moment
|
||||||
|
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
public void commencerJeux(MouseEvent mouseEvent) throws IOException{
|
public void commencerJeux(MouseEvent mouseEvent) throws IOException{
|
||||||
System.out.println("Lancement du jeu...");
|
System.out.println("Lancement du jeu...");
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
</top>
|
</top>
|
||||||
<left>
|
<left>
|
||||||
<VBox alignment="CENTER" prefHeight="559.0" prefWidth="642.0" BorderPane.alignment="CENTER">
|
<VBox fx:id="vb1" alignment="CENTER" prefHeight="559.0" prefWidth="642.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
<children>
|
<children>
|
||||||
@ -135,7 +135,7 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
</left>
|
</left>
|
||||||
<right>
|
<right>
|
||||||
<VBox alignment="CENTER" prefHeight="559.0" prefWidth="694.0" BorderPane.alignment="CENTER">
|
<VBox fx:id="vb2" alignment="CENTER" prefHeight="559.0" prefWidth="694.0" BorderPane.alignment="CENTER">
|
||||||
<children>
|
<children>
|
||||||
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
<HBox alignment="CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||||
<children>
|
<children>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user