From 3199564292633b71d70a6f054cdfd717101834af Mon Sep 17 00:00:00 2001 From: rubenpirreram Date: Fri, 15 May 2026 16:55:23 +0200 Subject: [PATCH] Fixed: totem colors --- .../java/it/polimi/ingsw/gc14/ServerLauncher.java | 5 ++++- .../ingsw/gc14/View/GUI/TotemFXMLController.java | 12 ++++++------ src/main/resources/GUIScene/totem.fxml | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java b/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java index 9730192..54587cd 100644 --- a/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java +++ b/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java @@ -258,7 +258,10 @@ public class ServerLauncher { while (true) { try{ this.doFirstEvent(); - this.view.fullRender(); + if(view!=null) + { + view.fullRender(); + } } catch(InterruptedException e){ Thread.currentThread().interrupt(); diff --git a/src/main/java/it/polimi/ingsw/gc14/View/GUI/TotemFXMLController.java b/src/main/java/it/polimi/ingsw/gc14/View/GUI/TotemFXMLController.java index 35d2c43..6e128b4 100644 --- a/src/main/java/it/polimi/ingsw/gc14/View/GUI/TotemFXMLController.java +++ b/src/main/java/it/polimi/ingsw/gc14/View/GUI/TotemFXMLController.java @@ -74,7 +74,7 @@ public class TotemFXMLController { private void updateBanner(String chooser, boolean myTurn) { if (myTurn) { - turnBanner.setText("✦ It's your turn to choice ✦"); + turnBanner.setText("✦ It's your turn to choose ✦"); turnBanner.setStyle( "-fx-font-family: 'Cinzel'; -fx-font-size: 13; -fx-letter-spacing: 3;" + "-fx-text-fill: #000000;" + @@ -85,7 +85,7 @@ public class TotemFXMLController { "-fx-effect: dropshadow(gaussian, rgba(244,192,90,0.3), 18, 0, 0, 0);" ); } else { - turnBanner.setText("Waiting " + chooser + " chooses his totem…"); + turnBanner.setText("Waiting for" + chooser + " to choose his totem…"); turnBanner.setStyle( "-fx-font-family: 'Cinzel'; -fx-font-size: 11; -fx-letter-spacing: 2;" + "-fx-text-fill: #000000;" + @@ -178,15 +178,15 @@ public class TotemFXMLController { } private String frameStyle(boolean selected) { - return "-fx-border-color: " + (selected ? "#f4c05a" : "rgba(200,120,20,0.28)") + ";" + - "-fx-border-width: " + (selected ? "2" : "0") + ";" + + return "-fx-border-color: " + (selected ? "#75FF79" : "rgba(200,120,20,0.28)") + ";" + + "-fx-border-width: " + (selected ? "0" : "0") + ";" + "-fx-border-radius: 4 4 0 0; -fx-background-radius: 4 4 0 0;" + - (selected ? "-fx-effect: dropshadow(gaussian, rgba(244,192,90,0.35), 22, 0, 0, 0);" : ""); + (selected ? "-fx-effect: dropshadow(gaussian, #ffffff, 20, 0.33, 0, 0);" : ""); } private String nameStyle(boolean selected) { return "-fx-font-family: 'Cinzel'; -fx-font-size: 10; -fx-letter-spacing: 2;" + - "-fx-text-fill: " + (selected ? "#f4c05a" : "ffffff") + ";"; + "-fx-text-fill: " + (selected ? "#ffffff" : "ffffff") + ";"; } private String capitalize(Totems t) { diff --git a/src/main/resources/GUIScene/totem.fxml b/src/main/resources/GUIScene/totem.fxml index 54b355a..40ca776 100644 --- a/src/main/resources/GUIScene/totem.fxml +++ b/src/main/resources/GUIScene/totem.fxml @@ -47,7 +47,7 @@ -