adaptation interfaces boolean
This commit is contained in:
@@ -6,13 +6,13 @@ import java.util.ResourceBundle;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import main.GestionnaireJeu;
|
||||
|
||||
public class ChoisirBoolean implements Initializable {
|
||||
|
||||
|
||||
@FXML private Button ouiButton;
|
||||
@FXML private Button nonButton;
|
||||
@FXML private Label titre;
|
||||
|
||||
private boolean result;
|
||||
@Override
|
||||
@@ -36,5 +36,28 @@ public class ChoisirBoolean implements Initializable {
|
||||
public boolean getResult() {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
public Button getOuiButton() {
|
||||
return ouiButton;
|
||||
}
|
||||
|
||||
public void setOuiButton(Button ouiButton) {
|
||||
this.ouiButton = ouiButton;
|
||||
}
|
||||
|
||||
public Button getNonButton() {
|
||||
return nonButton;
|
||||
}
|
||||
|
||||
public void setNonButton(Button nonButton) {
|
||||
this.nonButton = nonButton;
|
||||
}
|
||||
|
||||
public Label getTitre() {
|
||||
return titre;
|
||||
}
|
||||
|
||||
public void setTitre(Label titre) {
|
||||
this.titre = titre;
|
||||
}
|
||||
}
|
||||
|
@@ -45,7 +45,7 @@ public class JouerSonTour1Controller implements Initializable{
|
||||
btnLancer.setVisible(false);
|
||||
btnStop.setVisible(true);
|
||||
|
||||
for (int i=1; i<7; i++) {
|
||||
/*for (int i=1; i<7; i++) {
|
||||
Thread.sleep(500);
|
||||
d6.setText(Integer.toString(i));
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public class JouerSonTour1Controller implements Initializable{
|
||||
for (int i=1; i<5; i++) {
|
||||
Thread.sleep(500);
|
||||
d4.setText(Integer.toString(i));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
@FXML
|
||||
|
@@ -1,51 +1,9 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import carte.CarteLieu;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
public class JouerSonTour2Controller implements Initializable{
|
||||
private CarteLieu lieu;
|
||||
|
||||
@FXML private Pane rootPane;
|
||||
@FXML private Label descriptionLieu;
|
||||
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
System.out.println("\tDescrption du lieux");
|
||||
//descriptionLieu.setText(lieu.getDescription());
|
||||
public class JouerSonTour2Controller extends ChoisirBoolean{
|
||||
public void initButtons () {
|
||||
super.getOuiButton().setText("utiliser.capaciter.lieux");
|
||||
super.getNonButton().setText("sauter.etape");
|
||||
super.getTitre().setText("description.capacite.carte.lieux");
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void ignorerEtape(MouseEvent mouseEvent) throws IOException{
|
||||
Pane pane = FXMLLoader.load(getClass().getResource("/ihm/ressources/Jouer_tour(3)attaquer.fxml"));
|
||||
rootPane.getChildren().setAll(pane);
|
||||
}
|
||||
|
||||
@FXML
|
||||
public void capaciteLieu(MouseEvent mouseEvent) throws IOException{
|
||||
/*//si le lieu fait attaquer ou se soigner
|
||||
if (lieu.getNom().compareTo("foret hantee")) {
|
||||
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/Jouer_tour(2c)attaquer_soigner.fxml"));
|
||||
rootPane.getChildren().setAll(pane);
|
||||
//si le lieu fait voler une carte equipement
|
||||
}else if(lieu.getNom().compareTo("sanctuaire ancien")) {
|
||||
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/Jouer_tour(2a)voler_equipement.fxml"));
|
||||
rootPane.getChildren().setAll(pane);
|
||||
//si le lieu fait piocher une carte
|
||||
}else {
|
||||
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/Jouer_tour(2b)piocher_carte.fxml"));
|
||||
rootPane.getChildren().setAll(pane);
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
9
src/ihm/controller/JouerSonTour2c1Controller.java
Normal file
9
src/ihm/controller/JouerSonTour2c1Controller.java
Normal file
@@ -0,0 +1,9 @@
|
||||
package ihm.controller;
|
||||
|
||||
public class JouerSonTour2c1Controller extends ChoisirBoolean{
|
||||
public void initButtons () {
|
||||
super.getOuiButton().setText("Attaquer !");
|
||||
super.getNonButton().setText("se.soigner");
|
||||
super.getTitre().setText("attaquer.ou.soigner");
|
||||
}
|
||||
}
|
@@ -1,35 +1,9 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class JouerSonTour3Controller implements Initializable{
|
||||
@FXML private Pane rootPane;
|
||||
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
|
||||
public class JouerSonTour3Controller extends ChoisirBoolean{
|
||||
public void initButtons () {
|
||||
super.getOuiButton().setText("Attaquer !");
|
||||
super.getNonButton().setText("Ne pas attaquer");
|
||||
super.getTitre().setText("Voulez-vous attaquer un joueur ?");
|
||||
}
|
||||
|
||||
/*@FXML
|
||||
public void choixJoueur(MouseEvent mouseEvent) throws IOException{
|
||||
Pane pane = FXMLLoader.load(getClass().getResource("../ressources/jouerSonTour4.fxml"));
|
||||
rootPane.getChildren().setAll(pane);
|
||||
|
||||
}*/
|
||||
|
||||
@FXML
|
||||
public void pasAttaquer(MouseEvent mouseEvent) throws IOException{
|
||||
Stage appStage = (Stage) ((Node) mouseEvent.getSource()).getScene().getWindow();
|
||||
appStage.close();
|
||||
}
|
||||
}
|
||||
|
@@ -1,19 +0,0 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
public class JouerSonTour4Controller implements Initializable{
|
||||
@FXML private Pane rootPane;
|
||||
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
public class JouerSonTour5Controller implements Initializable{
|
||||
@FXML private Pane rootPane;
|
||||
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@FXML
|
||||
public void equipementVole(MouseEvent mouseEvent) throws IOException{
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/jouerSonTour6.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane pane = fxmlLoader.load();
|
||||
rootPane.getChildren().setAll(pane);
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,44 +0,0 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
public class JouerSonTour6Controller implements Initializable{
|
||||
@FXML private Pane rootPane;
|
||||
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@FXML
|
||||
public void piocherVision(MouseEvent mouseEvent) throws IOException{
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/jouer_Son_Tour_piocher_vision.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane pane = fxmlLoader.load();
|
||||
|
||||
rootPane.getChildren().setAll(pane);
|
||||
|
||||
}
|
||||
@FXML
|
||||
public void piocherTenebre(MouseEvent mouseEvent) throws IOException{
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/jouer_Son_Tour_piocher_lum_et_ten.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane pane = fxmlLoader.load();
|
||||
|
||||
rootPane.getChildren().setAll(pane);
|
||||
|
||||
}
|
||||
}
|
@@ -1,34 +0,0 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
public class JouerSonTourDonnerVisionController implements Initializable{
|
||||
@FXML private Pane rootPane;
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@FXML
|
||||
public void attaquer(MouseEvent mouseEvent) throws IOException{
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/jouer_Son_Tour_recevoir_blessure.fxml");
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.ENGLISH);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane pane = fxmlLoader.load();
|
||||
|
||||
rootPane.getChildren().setAll(pane);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
public class PiocherLumiereTenebreController implements Initializable{
|
||||
@FXML private Pane rootPane;
|
||||
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,33 +0,0 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URL;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
public class PiocherVisionController implements Initializable{
|
||||
@FXML private Pane rootPane;
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
@FXML
|
||||
public void voirCarte(MouseEvent mouseEvent) throws IOException{
|
||||
|
||||
final URL fxmlURL = getClass().getResource("/ihm/ressources/jouer_Son_Tour_donner_vision.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);
|
||||
|
||||
}
|
||||
|
||||
}
|
@@ -1,19 +0,0 @@
|
||||
package ihm.controller;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.fxml.Initializable;
|
||||
import javafx.scene.layout.Pane;
|
||||
|
||||
public class RecevoirBlessureController implements Initializable{
|
||||
@FXML private Pane rootPane;
|
||||
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user