From a673c9cfaa197aabd27bdaf8dfee704f89d219ca Mon Sep 17 00:00:00 2001 From: Aleandro Date: Wed, 27 May 2026 19:49:32 +0200 Subject: [PATCH] Small graphical fixes --- .../gc14/View/GUI/MainFXMLController.java | 18 +++++++++--------- src/main/resources/GUIScene/standing.fxml | 8 ++++++-- src/main/resources/GUIScene/totem.fxml | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/src/main/java/it/polimi/ingsw/gc14/View/GUI/MainFXMLController.java b/src/main/java/it/polimi/ingsw/gc14/View/GUI/MainFXMLController.java index 3e64993..9fdf3a0 100644 --- a/src/main/java/it/polimi/ingsw/gc14/View/GUI/MainFXMLController.java +++ b/src/main/java/it/polimi/ingsw/gc14/View/GUI/MainFXMLController.java @@ -162,7 +162,7 @@ public class MainFXMLController { // ==== ELEMENTS ==== private StackPane createOrder(String num) { ImageView img = new ImageView(loadImage("/GUIImages/Orders/order-" + num + ".png")); - img.fitHeightProperty().bind(board.sceneProperty().get().heightProperty().subtract(55).divide(4).multiply(0.94)); + img.fitHeightProperty().bind(board.sceneProperty().get().heightProperty().subtract(56).divide(4).multiply(0.94)); img.setPreserveRatio(true); addClip(img); return new StackPane(img); @@ -171,7 +171,7 @@ public class MainFXMLController { private StackPane createSlot(Slot slot, boolean withZoom, boolean withShadow) { ImageView img = new ImageView(loadImage("/GUIImages/Fronts/card-" + slot.getSlotId() + ".png")); img.setPreserveRatio(true); - img.fitHeightProperty().bind(board.sceneProperty().get().heightProperty().subtract(55).divide(4).multiply(0.94)); + img.fitHeightProperty().bind(board.sceneProperty().get().heightProperty().subtract(56).divide(4).multiply(0.94)); addClip(img); StackPane wrapper = new StackPane(img); @@ -193,7 +193,7 @@ public class MainFXMLController { private StackPane createCard(PlayableCard card, boolean withZoom, boolean withShadow, Region parent) { ImageView img = new ImageView(loadImage("/GUIImages/Fronts/card-" + card.getIdIMG() + ".png")); img.setPreserveRatio(true); - img.fitHeightProperty().bind(parent.getScene().heightProperty().subtract(55).divide(4).multiply(0.90)); + img.fitHeightProperty().bind(parent.getScene().heightProperty().subtract(56).divide(4).multiply(0.90)); addClip(img); StackPane wrapper = new StackPane(img); if (withShadow) addShadow(wrapper); @@ -241,7 +241,7 @@ public class MainFXMLController { if (!cardList.isEmpty()) { StackPane img = createCard(cardList.getLast(), true, true, upperList); Label label = new Label(String.valueOf(cardList.size())); - label.setTranslateY(-55); + label.setTranslateY(-56); label.setTranslateX(10); label.getStyleClass().add("label-large"); StackPane.setAlignment(label, Pos.TOP_RIGHT); @@ -256,7 +256,7 @@ public class MainFXMLController { if (!cardList.isEmpty()) { StackPane img = createCard(cardList.getLast(), true, true, lowerList); Label label = new Label(String.valueOf(cardList.size())); - label.setTranslateY(-55); + label.setTranslateY(-56); label.setTranslateX(10); label.getStyleClass().add("label-large"); StackPane.setAlignment(label, Pos.TOP_RIGHT); @@ -270,7 +270,7 @@ public class MainFXMLController { if (!cardList.isEmpty()) { StackPane img = createCard(cardList.getLast(), true, true, myHand); Label label = new Label(String.valueOf(cardList.size())); - label.setTranslateY(-55); + label.setTranslateY(-56); label.setTranslateX(10); label.getStyleClass().add("label-large"); StackPane.setAlignment(label, Pos.TOP_RIGHT); @@ -279,7 +279,7 @@ public class MainFXMLController { myHand.getChildren().add(img); } else { Region placeholder = new Region(); - placeholder.prefHeightProperty().bind(myHand.getScene().heightProperty().subtract(55).divide(4).multiply(0.90)); + placeholder.prefHeightProperty().bind(myHand.getScene().heightProperty().subtract(56).divide(4).multiply(0.90)); placeholder.prefWidthProperty().bind(placeholder.prefHeightProperty().multiply(0.675)); placeholder.setStyle("-fx-background-color: transparent;"); myHand.getChildren().add(placeholder); @@ -316,7 +316,7 @@ public class MainFXMLController { usernameLabel.setText(usernameLabel.getText() + " (you)"); if(isError) { - TranslateTransition tt = new TranslateTransition(Duration.millis(55), card); + TranslateTransition tt = new TranslateTransition(Duration.millis(56), card); tt.setFromX(0); tt.setByX(10); tt.setCycleCount(6); @@ -461,7 +461,7 @@ public class MainFXMLController { default -> "/GUIImages/Backs/back-001.png"; }; ImageView back = new ImageView(loadImage(path)); - back.fitHeightProperty().bind(board.sceneProperty().get().heightProperty().subtract(55).divide(4).multiply(0.94)); + back.fitHeightProperty().bind(board.sceneProperty().get().heightProperty().subtract(56).divide(4).multiply(0.94)); back.setPreserveRatio(true); addClip(back); addShadow(back); diff --git a/src/main/resources/GUIScene/standing.fxml b/src/main/resources/GUIScene/standing.fxml index ba84d87..8ae6e9a 100644 --- a/src/main/resources/GUIScene/standing.fxml +++ b/src/main/resources/GUIScene/standing.fxml @@ -24,8 +24,12 @@ -