Merge branch 'development' of https://github.com/PTE-SH/ShadowHunterGame into development
This commit is contained in:
commit
892dd6da73
@ -30,6 +30,8 @@ public class ParametreController implements Initializable {
|
|||||||
private ComboBox<String> langues;
|
private ComboBox<String> langues;
|
||||||
public static boolean cbMusiqueCoche = false; // verifi si la checbox musical est coche
|
public static boolean cbMusiqueCoche = false; // verifi si la checbox musical est coche
|
||||||
public static boolean cbSonCoche = false;
|
public static boolean cbSonCoche = false;
|
||||||
|
public static boolean cbClair = false;
|
||||||
|
|
||||||
boolean MusiqueLancee = false; //verifi si la musique a déja été lancé une première fois
|
boolean MusiqueLancee = false; //verifi si la musique a déja été lancé une première fois
|
||||||
|
|
||||||
String filepathMusique = "/ihm/ressources/musique/The_Red_Fox_Tavern.wav"; // lien vers la musique : https://www.youtube.com/watch?v=LBpKUIyOHdo
|
String filepathMusique = "/ihm/ressources/musique/The_Red_Fox_Tavern.wav"; // lien vers la musique : https://www.youtube.com/watch?v=LBpKUIyOHdo
|
||||||
@ -43,6 +45,12 @@ public class ParametreController implements Initializable {
|
|||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
|
|
||||||
|
cmusique.setSelected(cbMusiqueCoche);
|
||||||
|
cbEffetSonore.setSelected(cbSonCoche);
|
||||||
|
clair.setSelected(cbClair);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
langues.getItems().add("Anglais");
|
langues.getItems().add("Anglais");
|
||||||
langues.getItems().add("Allemand");
|
langues.getItems().add("Allemand");
|
||||||
langues.getItems().add("Espagnol");
|
langues.getItems().add("Espagnol");
|
||||||
@ -95,6 +103,8 @@ public class ParametreController implements Initializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Pour la couleur du theme
|
// Pour la couleur du theme
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -127,8 +137,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();
|
||||||
|
|
||||||
|
@ -36,13 +36,9 @@ public class PauseController implements Initializable {
|
|||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
|
|
||||||
if (MusiqueLancee == true) {
|
cbMusique.setSelected(ParametreController.cbMusiqueCoche);
|
||||||
cbMusique.setSelected(true);
|
cbEffet.setSelected(ParametreController.cbSonCoche);
|
||||||
}
|
|
||||||
|
|
||||||
if (SonLance == true) {
|
|
||||||
cbEffet.setSelected(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,6 +99,15 @@ 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 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 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);
|
||||||
@ -120,5 +125,6 @@ public class PauseController implements Initializable {
|
|||||||
public void baisserVolume(MouseEvent mouseEvent) throws IOException{
|
public void baisserVolume(MouseEvent mouseEvent) throws IOException{
|
||||||
Musique.volumeDown(5.f);
|
Musique.volumeDown(5.f);
|
||||||
System.out.println("on baisse le son");
|
System.out.println("on baisse le son");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,7 @@ 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;
|
||||||
|
|
||||||
public static int DICE_SIX = 2;
|
public static int DICE_SIX = 2;
|
||||||
@ -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);
|
||||||
@ -303,7 +306,7 @@ public class PlateauController implements Initializable {
|
|||||||
EffetSonore.playSoundEffect(fileSound1);
|
EffetSonore.playSoundEffect(fileSound1);
|
||||||
|
|
||||||
System.out.println("Jeu en pause ...");
|
System.out.println("Jeu en pause ...");
|
||||||
final URL fxmlURL = getClass().getResource("../ressources/Pause.fxml");
|
final URL fxmlURL = getClass().getResource("/ihm/ressources/Pause.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 root = (Pane)fxmlLoader.load();
|
Pane root = (Pane)fxmlLoader.load();
|
||||||
|
@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@ public class ReglesControlleur implements Initializable {
|
|||||||
@Override
|
@Override
|
||||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||||
|
|
||||||
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle1.png");
|
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle1.PNG");
|
||||||
Image image = new Image(input);
|
Image image = new Image(input);
|
||||||
imageRegles.setImage(image);
|
imageRegles.setImage(image);
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ public class ReglesControlleur implements Initializable {
|
|||||||
System.out.println("C'est la dernière page!");
|
System.out.println("C'est la dernière page!");
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".png");
|
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".PNG");
|
||||||
Image image = new Image(input);
|
Image image = new Image(input);
|
||||||
imageRegles.setImage(image);
|
imageRegles.setImage(image);
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ public class ReglesControlleur implements Initializable {
|
|||||||
System.out.println("C'est la première page!");
|
System.out.println("C'est la première page!");
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".png");
|
InputStream input = getClass().getResourceAsStream("/ihm/ressources/img/Regle" + index + ".PNG");
|
||||||
Image image = new Image(input);
|
Image image = new Image(input);
|
||||||
imageRegles.setImage(image);
|
imageRegles.setImage(image);
|
||||||
|
|
||||||
|
@ -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