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;
|
||||
public static boolean cbMusiqueCoche = false; // verifi si la checbox musical est coche
|
||||
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
|
||||
|
||||
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
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
|
||||
cmusique.setSelected(cbMusiqueCoche);
|
||||
cbEffetSonore.setSelected(cbSonCoche);
|
||||
clair.setSelected(cbClair);
|
||||
|
||||
|
||||
|
||||
langues.getItems().add("Anglais");
|
||||
langues.getItems().add("Allemand");
|
||||
langues.getItems().add("Espagnol");
|
||||
@ -94,6 +102,8 @@ public class ParametreController implements Initializable {
|
||||
System.out.println(EffetSonore.isSoundOK());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 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
|
||||
|
||||
// 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 FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane pane = fxmlLoader.load();
|
||||
|
||||
|
@ -36,14 +36,10 @@ public class PauseController implements Initializable {
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
|
||||
if (MusiqueLancee == true) {
|
||||
cbMusique.setSelected(true);
|
||||
}
|
||||
|
||||
if (SonLance == true) {
|
||||
cbEffet.setSelected(true);
|
||||
}
|
||||
cbMusique.setSelected(ParametreController.cbMusiqueCoche);
|
||||
cbEffet.setSelected(ParametreController.cbSonCoche);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@FXML
|
||||
@ -103,6 +99,15 @@ public class PauseController implements Initializable {
|
||||
Stage appStage = (Stage) ((Node) me.getSource()).getScene().getWindow();
|
||||
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 ResourceBundle bundle = ResourceBundle.getBundle("domaine.properties.langue", Locale.FRENCH);
|
||||
final FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
@ -120,5 +125,6 @@ public class PauseController implements Initializable {
|
||||
public void baisserVolume(MouseEvent mouseEvent) throws IOException{
|
||||
Musique.volumeDown(5.f);
|
||||
System.out.println("on baisse le son");
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ public class PlateauController implements Initializable {
|
||||
@FXML private AnchorPane rootPane;
|
||||
@FXML private GridPane gridPaneVie;
|
||||
@FXML public GridPane gridPaneLieux;
|
||||
|
||||
|
||||
private ChoisirBoolean cb;
|
||||
|
||||
@ -51,7 +52,7 @@ public class PlateauController implements Initializable {
|
||||
@Override
|
||||
public void initialize(URL arg0, ResourceBundle arg1) {
|
||||
//System.out.println("Création du plateau ...");
|
||||
|
||||
|
||||
this.joueursIHM = new ArrayList<JoueurIHM>();
|
||||
GestionnaireJeu gj = GestionnaireJeu.getGestionnaireJeu();
|
||||
Map<Integer, Joueur> map = gj.getMapJoueurs();
|
||||
@ -61,6 +62,7 @@ public class PlateauController implements Initializable {
|
||||
Pane p = (Pane) gridPaneVie.getChildren().get(i);
|
||||
Label l = (Label) p.getChildren().get(1);
|
||||
l.setText(i+"");
|
||||
|
||||
}
|
||||
|
||||
for(int i : map.keySet()) {
|
||||
@ -159,6 +161,7 @@ public class PlateauController implements Initializable {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private Pane getPaneJoueur(int i) {
|
||||
|
||||
System.out.println("i "+i);
|
||||
@ -303,7 +306,7 @@ public class PlateauController implements Initializable {
|
||||
EffetSonore.playSoundEffect(fileSound1);
|
||||
|
||||
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 FXMLLoader fxmlLoader = new FXMLLoader(fxmlURL, bundle);
|
||||
Pane root = (Pane)fxmlLoader.load();
|
||||
|
@ -23,6 +23,7 @@ import javafx.scene.control.TextField;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.stage.Stage;
|
||||
import main.Configuration;
|
||||
import main.GestionnaireJeu;
|
||||
@ -213,4 +214,14 @@ public class PlayersController implements Initializable{
|
||||
}else
|
||||
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
|
||||
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);
|
||||
imageRegles.setImage(image);
|
||||
|
||||
@ -51,7 +51,7 @@ public class ReglesControlleur implements Initializable {
|
||||
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);
|
||||
imageRegles.setImage(image);
|
||||
|
||||
@ -71,7 +71,7 @@ public class ReglesControlleur implements Initializable {
|
||||
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);
|
||||
imageRegles.setImage(image);
|
||||
|
||||
|
@ -164,6 +164,14 @@
|
||||
<Insets top="20.0" />
|
||||
</VBox.margin>
|
||||
</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>
|
||||
</VBox>
|
||||
</center>
|
||||
|
Loading…
x
Reference in New Issue
Block a user