diff --git a/turingmachine/src/main/java/com/turingmachine/gui/CriteriaCardSelectionController.java b/turingmachine/src/main/java/com/turingmachine/gui/CriteriaCardSelectionController.java index e823148..4b4493f 100644 --- a/turingmachine/src/main/java/com/turingmachine/gui/CriteriaCardSelectionController.java +++ b/turingmachine/src/main/java/com/turingmachine/gui/CriteriaCardSelectionController.java @@ -48,8 +48,8 @@ public void initialize(URL url, ResourceBundle rb) { Image critImage = new Image("file:turingmachine/src/main/resources/com/turingmachine/gui/imgs/"+critCard.getId()+".png"); selectedImage.setImage(critImage); selectedImage.setPreserveRatio(true); - selectedImage.setFitWidth(150); - selectedImage.setFitHeight(150); + selectedImage.setFitWidth(200); + selectedImage.setFitHeight(200); selectedImage.setOnMouseClicked(e -> { if (singleton.canCheckAnotherCriteria()) { @@ -76,7 +76,7 @@ public void initialize(URL url, ResourceBundle rb) { i++; } mygpane.setLayoutX(25); - mygpane.setLayoutY(250); + mygpane.setLayoutY(0); this.myPane.getChildren().addAll(mygpane); System.out.println("CriteriaCardSelectionController initialized"); diff --git a/turingmachine/src/main/java/com/turingmachine/gui/TuringMachine.java b/turingmachine/src/main/java/com/turingmachine/gui/TuringMachine.java index 542bb1c..2d2e3ad 100644 --- a/turingmachine/src/main/java/com/turingmachine/gui/TuringMachine.java +++ b/turingmachine/src/main/java/com/turingmachine/gui/TuringMachine.java @@ -6,6 +6,7 @@ import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.stage.Stage; +import javafx.scene.text.Font; import java.io.File; import java.io.IOException; @@ -22,7 +23,10 @@ public class TuringMachine extends Application { @Override public void start(Stage stage) throws IOException { - scene = new Scene(loadFXML("main-menu").load(), 640, 480); + // Font.loadFont(getClass().getResourceAsStream("C:/Users/pourc/Desktop/AP4B_TuringMachine/turingmachine/src/main/resources/com/turingmachine/gui/font/PressStart2P-Regular.ttf"), 14); + stage.setResizable(false); // Empêche la redimension de la fenêtre + + scene = new Scene(loadFXML("main-menu").load(), 800, 800); stage.setScene(scene); stage.setTitle("TuringMachine"); game = new Game(); diff --git a/turingmachine/src/main/java/com/turingmachine/gui/UsernameController.java b/turingmachine/src/main/java/com/turingmachine/gui/UsernameController.java index ff82cb1..1add79b 100644 --- a/turingmachine/src/main/java/com/turingmachine/gui/UsernameController.java +++ b/turingmachine/src/main/java/com/turingmachine/gui/UsernameController.java @@ -30,8 +30,8 @@ public void initialize(URL url, ResourceBundle rb) { singleton.addUsernameTextField(tf); } gPane.setHgap(10); - gPane.setLayoutX(150); - gPane.setLayoutY(200); + gPane.setLayoutX(325); + gPane.setLayoutY(300); this.myPane.getChildren().addAll(gPane); System.out.println("UsernameController initialized"); } diff --git a/turingmachine/src/main/resources/com/turingmachine/gui/coffre.png b/turingmachine/src/main/resources/com/turingmachine/gui/coffre.png new file mode 100644 index 0000000..927379c Binary files /dev/null and b/turingmachine/src/main/resources/com/turingmachine/gui/coffre.png differ diff --git a/turingmachine/src/main/resources/com/turingmachine/gui/computer.png b/turingmachine/src/main/resources/com/turingmachine/gui/computer.png new file mode 100644 index 0000000..70b6f6e Binary files /dev/null and b/turingmachine/src/main/resources/com/turingmachine/gui/computer.png differ diff --git a/turingmachine/src/main/resources/com/turingmachine/gui/criteria-card-selection.css b/turingmachine/src/main/resources/com/turingmachine/gui/criteria-card-selection.css new file mode 100644 index 0000000..18ba534 --- /dev/null +++ b/turingmachine/src/main/resources/com/turingmachine/gui/criteria-card-selection.css @@ -0,0 +1,12 @@ +AnchorPane { + -fx-background-image: url('coffre.png'); + -fx-background-size: cover; + -fx-background-repeat: no-repeat; +} + + +Label { + -fx-font-family: "Impact"; + -fx-text-fill: #ffffff; +} + diff --git a/turingmachine/src/main/resources/com/turingmachine/gui/criteria-card-selection.fxml b/turingmachine/src/main/resources/com/turingmachine/gui/criteria-card-selection.fxml index 2b03744..5744b8c 100644 --- a/turingmachine/src/main/resources/com/turingmachine/gui/criteria-card-selection.fxml +++ b/turingmachine/src/main/resources/com/turingmachine/gui/criteria-card-selection.fxml @@ -1,22 +1,13 @@ - - - - - + - -