Fixed: Totem CHoice fxml and controller labels color
This commit is contained in:
@@ -23,7 +23,6 @@ public class TotemFXMLController {
|
||||
public ImageView backgroundImage;
|
||||
@FXML private HBox mainHBox;
|
||||
@FXML private Label turnBanner;
|
||||
@FXML private Label selectedLabel;
|
||||
@FXML private Button confirmButton;
|
||||
|
||||
private ClientController controller;
|
||||
@@ -47,7 +46,6 @@ public class TotemFXMLController {
|
||||
mainHBox.getChildren().clear();
|
||||
selectedIndex = -1;
|
||||
selectedFrame = null;
|
||||
selectedLabel.setText("");
|
||||
|
||||
String chooser = controller.miniModel.currentState.getCurrentPlayer().getUserName(); // adatta al tuo campo
|
||||
boolean myTurn = chooser.equals(controller.myUsername);
|
||||
@@ -79,9 +77,9 @@ public class TotemFXMLController {
|
||||
turnBanner.setText("✦ It's your turn to choice ✦");
|
||||
turnBanner.setStyle(
|
||||
"-fx-font-family: 'Cinzel'; -fx-font-size: 13; -fx-letter-spacing: 3;" +
|
||||
"-fx-text-fill: #f4c05a;" +
|
||||
"-fx-background-color: rgba(244,192,90,0.1);" +
|
||||
"-fx-border-color: rgba(244,192,90,0.45); -fx-border-width: 1;" +
|
||||
"-fx-text-fill: #000000;" +
|
||||
"-fx-background-color: linear-gradient(to right, #f4c05a, #c8791a, #f4c05a);" +
|
||||
"-fx-border-color: #000000; -fx-border-width: 1;" +
|
||||
"-fx-border-radius: 3; -fx-background-radius: 3;" +
|
||||
"-fx-padding: 10 28 10 28;" +
|
||||
"-fx-effect: dropshadow(gaussian, rgba(244,192,90,0.3), 18, 0, 0, 0);"
|
||||
@@ -90,9 +88,9 @@ public class TotemFXMLController {
|
||||
turnBanner.setText("Waiting " + chooser + " chooses his totem…");
|
||||
turnBanner.setStyle(
|
||||
"-fx-font-family: 'Cinzel'; -fx-font-size: 11; -fx-letter-spacing: 2;" +
|
||||
"-fx-text-fill: rgba(200,155,90,0.6);" +
|
||||
"-fx-background-color: rgba(120,60,10,0.18);" +
|
||||
"-fx-border-color: rgba(200,120,20,0.22); -fx-border-width: 1;" +
|
||||
"-fx-text-fill: #000000;" +
|
||||
"-fx-background-color: linear-gradient(to right, #f4c05a, #c8791a, #f4c05a)" +
|
||||
"-fx-border-color: #000000; -fx-border-width: 1;" +
|
||||
"-fx-border-radius: 3; -fx-background-radius: 3;" +
|
||||
"-fx-padding: 10 28 10 28;"
|
||||
);
|
||||
@@ -161,7 +159,6 @@ public class TotemFXMLController {
|
||||
pop.setToX(1.08); pop.setToY(1.08);
|
||||
pop.setAutoReverse(true); pop.setCycleCount(2); pop.play();
|
||||
|
||||
selectedLabel.setText(capitalize(totem).toUpperCase() + " choice");
|
||||
updateConfirmButton(true);
|
||||
});
|
||||
|
||||
@@ -181,8 +178,7 @@ public class TotemFXMLController {
|
||||
}
|
||||
|
||||
private String frameStyle(boolean selected) {
|
||||
return " " +
|
||||
"-fx-border-color: " + (selected ? "#f4c05a" : "rgba(200,120,20,0.28)") + ";" +
|
||||
return "-fx-border-color: " + (selected ? "#f4c05a" : "rgba(200,120,20,0.28)") + ";" +
|
||||
"-fx-border-width: " + (selected ? "2" : "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);" : "");
|
||||
@@ -190,7 +186,7 @@ public class TotemFXMLController {
|
||||
|
||||
private String nameStyle(boolean selected) {
|
||||
return "-fx-font-family: 'Cinzel'; -fx-font-size: 10; -fx-letter-spacing: 2;" +
|
||||
"-fx-text-fill: " + (selected ? "#f4c05a" : "rgba(200,175,130,0.65)") + ";";
|
||||
"-fx-text-fill: " + (selected ? "#f4c05a" : "ffffff") + ";";
|
||||
}
|
||||
|
||||
private String capitalize(Totems t) {
|
||||
@@ -198,11 +194,6 @@ public class TotemFXMLController {
|
||||
return Character.toUpperCase(s.charAt(0)) + s.substring(1);
|
||||
}
|
||||
|
||||
private String totemElement(Totems t) {
|
||||
return switch (t) {
|
||||
default -> t.name();
|
||||
};
|
||||
}
|
||||
|
||||
@FXML
|
||||
private void onConfirm() {
|
||||
|
||||
@@ -41,13 +41,11 @@
|
||||
<!-- Banner turno -->
|
||||
<Label fx:id="turnBanner" maxWidth="640" wrapText="true" textAlignment="CENTER"
|
||||
style="-fx-font-family: 'Cinzel'; -fx-font-size: 12; -fx-letter-spacing: 3;
|
||||
-fx-padding: 10 28 10 28; -fx-background-radius: 3; -fx-border-radius: 3;">
|
||||
-fx-padding: 10 28 10 28; -fx-background-radius: 3; -fx-border-radius: 3;
|
||||
-fx-background-color: linear-gradient(to right, #f4c05a, #c8791a, #f4c05a)">
|
||||
<VBox.margin><Insets bottom="20"/></VBox.margin>
|
||||
</Label>
|
||||
|
||||
<Label text="Pre game totem choosing stage"
|
||||
style="-fx-font-family: 'Cinzel'; -fx-font-size: 10; -fx-text-fill: #9a5c14;
|
||||
-fx-letter-spacing: 5;"/>
|
||||
|
||||
<Label text="Choice your totem"
|
||||
style="-fx-font-family: 'Cinzel Decorative'; -fx-font-size: 30; -fx-font-weight: bold;
|
||||
@@ -65,11 +63,6 @@
|
||||
<VBox.margin><Insets bottom="18"/></VBox.margin>
|
||||
</HBox>
|
||||
|
||||
<Label fx:id="selectedLabel" text=""
|
||||
style="-fx-font-family: 'Cinzel'; -fx-font-size: 10; -fx-text-fill: rgba(200,120,20,0.75);
|
||||
-fx-letter-spacing: 3;">
|
||||
<VBox.margin><Insets bottom="10"/></VBox.margin>
|
||||
</Label>
|
||||
|
||||
<Button fx:id="confirmButton" text="CONFIRM" onAction="#onConfirm" disable="true"
|
||||
style="-fx-font-family: 'Cinzel'; -fx-font-size: 12; -fx-font-weight: bold;
|
||||
|
||||
Reference in New Issue
Block a user