Small graphical fixes
This commit is contained in:
@@ -162,7 +162,7 @@ public class MainFXMLController {
|
|||||||
// ==== ELEMENTS ====
|
// ==== ELEMENTS ====
|
||||||
private StackPane createOrder(String num) {
|
private StackPane createOrder(String num) {
|
||||||
ImageView img = new ImageView(loadImage("/GUIImages/Orders/order-" + num + ".png"));
|
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);
|
img.setPreserveRatio(true);
|
||||||
addClip(img);
|
addClip(img);
|
||||||
return new StackPane(img);
|
return new StackPane(img);
|
||||||
@@ -171,7 +171,7 @@ public class MainFXMLController {
|
|||||||
private StackPane createSlot(Slot slot, boolean withZoom, boolean withShadow) {
|
private StackPane createSlot(Slot slot, boolean withZoom, boolean withShadow) {
|
||||||
ImageView img = new ImageView(loadImage("/GUIImages/Fronts/card-" + slot.getSlotId() + ".png"));
|
ImageView img = new ImageView(loadImage("/GUIImages/Fronts/card-" + slot.getSlotId() + ".png"));
|
||||||
img.setPreserveRatio(true);
|
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);
|
addClip(img);
|
||||||
StackPane wrapper = new StackPane(img);
|
StackPane wrapper = new StackPane(img);
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ public class MainFXMLController {
|
|||||||
private StackPane createCard(PlayableCard card, boolean withZoom, boolean withShadow, Region parent) {
|
private StackPane createCard(PlayableCard card, boolean withZoom, boolean withShadow, Region parent) {
|
||||||
ImageView img = new ImageView(loadImage("/GUIImages/Fronts/card-" + card.getIdIMG() + ".png"));
|
ImageView img = new ImageView(loadImage("/GUIImages/Fronts/card-" + card.getIdIMG() + ".png"));
|
||||||
img.setPreserveRatio(true);
|
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);
|
addClip(img);
|
||||||
StackPane wrapper = new StackPane(img);
|
StackPane wrapper = new StackPane(img);
|
||||||
if (withShadow) addShadow(wrapper);
|
if (withShadow) addShadow(wrapper);
|
||||||
@@ -241,7 +241,7 @@ public class MainFXMLController {
|
|||||||
if (!cardList.isEmpty()) {
|
if (!cardList.isEmpty()) {
|
||||||
StackPane img = createCard(cardList.getLast(), true, true, upperList);
|
StackPane img = createCard(cardList.getLast(), true, true, upperList);
|
||||||
Label label = new Label(String.valueOf(cardList.size()));
|
Label label = new Label(String.valueOf(cardList.size()));
|
||||||
label.setTranslateY(-55);
|
label.setTranslateY(-56);
|
||||||
label.setTranslateX(10);
|
label.setTranslateX(10);
|
||||||
label.getStyleClass().add("label-large");
|
label.getStyleClass().add("label-large");
|
||||||
StackPane.setAlignment(label, Pos.TOP_RIGHT);
|
StackPane.setAlignment(label, Pos.TOP_RIGHT);
|
||||||
@@ -256,7 +256,7 @@ public class MainFXMLController {
|
|||||||
if (!cardList.isEmpty()) {
|
if (!cardList.isEmpty()) {
|
||||||
StackPane img = createCard(cardList.getLast(), true, true, lowerList);
|
StackPane img = createCard(cardList.getLast(), true, true, lowerList);
|
||||||
Label label = new Label(String.valueOf(cardList.size()));
|
Label label = new Label(String.valueOf(cardList.size()));
|
||||||
label.setTranslateY(-55);
|
label.setTranslateY(-56);
|
||||||
label.setTranslateX(10);
|
label.setTranslateX(10);
|
||||||
label.getStyleClass().add("label-large");
|
label.getStyleClass().add("label-large");
|
||||||
StackPane.setAlignment(label, Pos.TOP_RIGHT);
|
StackPane.setAlignment(label, Pos.TOP_RIGHT);
|
||||||
@@ -270,7 +270,7 @@ public class MainFXMLController {
|
|||||||
if (!cardList.isEmpty()) {
|
if (!cardList.isEmpty()) {
|
||||||
StackPane img = createCard(cardList.getLast(), true, true, myHand);
|
StackPane img = createCard(cardList.getLast(), true, true, myHand);
|
||||||
Label label = new Label(String.valueOf(cardList.size()));
|
Label label = new Label(String.valueOf(cardList.size()));
|
||||||
label.setTranslateY(-55);
|
label.setTranslateY(-56);
|
||||||
label.setTranslateX(10);
|
label.setTranslateX(10);
|
||||||
label.getStyleClass().add("label-large");
|
label.getStyleClass().add("label-large");
|
||||||
StackPane.setAlignment(label, Pos.TOP_RIGHT);
|
StackPane.setAlignment(label, Pos.TOP_RIGHT);
|
||||||
@@ -279,7 +279,7 @@ public class MainFXMLController {
|
|||||||
myHand.getChildren().add(img);
|
myHand.getChildren().add(img);
|
||||||
} else {
|
} else {
|
||||||
Region placeholder = new Region();
|
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.prefWidthProperty().bind(placeholder.prefHeightProperty().multiply(0.675));
|
||||||
placeholder.setStyle("-fx-background-color: transparent;");
|
placeholder.setStyle("-fx-background-color: transparent;");
|
||||||
myHand.getChildren().add(placeholder);
|
myHand.getChildren().add(placeholder);
|
||||||
@@ -316,7 +316,7 @@ public class MainFXMLController {
|
|||||||
usernameLabel.setText(usernameLabel.getText() + " (you)");
|
usernameLabel.setText(usernameLabel.getText() + " (you)");
|
||||||
|
|
||||||
if(isError) {
|
if(isError) {
|
||||||
TranslateTransition tt = new TranslateTransition(Duration.millis(55), card);
|
TranslateTransition tt = new TranslateTransition(Duration.millis(56), card);
|
||||||
tt.setFromX(0);
|
tt.setFromX(0);
|
||||||
tt.setByX(10);
|
tt.setByX(10);
|
||||||
tt.setCycleCount(6);
|
tt.setCycleCount(6);
|
||||||
@@ -461,7 +461,7 @@ public class MainFXMLController {
|
|||||||
default -> "/GUIImages/Backs/back-001.png";
|
default -> "/GUIImages/Backs/back-001.png";
|
||||||
};
|
};
|
||||||
ImageView back = new ImageView(loadImage(path));
|
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);
|
back.setPreserveRatio(true);
|
||||||
addClip(back);
|
addClip(back);
|
||||||
addShadow(back);
|
addShadow(back);
|
||||||
|
|||||||
@@ -24,8 +24,12 @@
|
|||||||
</VBox>
|
</VBox>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
|
|
||||||
<Button fx:id="newGameButton" text="NUOVA PARTITA"
|
<Button fx:id="newGameButton" text="NEW GAME"
|
||||||
styleClass="action-button"
|
style="-fx-font-family: 'Cinzel'; -fx-font-size: 12; -fx-font-weight: bold;
|
||||||
|
-fx-letter-spacing: 4; -fx-text-fill: #0c0601;
|
||||||
|
-fx-background-color: linear-gradient(to right, #f4c05a, #c8791a, #f4c05a);
|
||||||
|
-fx-padding: 12 48 12 48; -fx-background-radius: 2;
|
||||||
|
-fx-cursor: hand;"
|
||||||
onAction="#onNewGame"/>
|
onAction="#onNewGame"/>
|
||||||
</VBox>
|
</VBox>
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
<padding><Insets top="40" bottom="40" left="40" right="40"/></padding>
|
<padding><Insets top="40" bottom="40" left="40" right="40"/></padding>
|
||||||
|
|
||||||
<!-- Banner turno -->
|
<!-- Banner turno -->
|
||||||
<Label fx:id="turnBanner" maxWidth="640" wrapText="true" textAlignment="CENTER"
|
<Label fx:id="turnBanner" maxWidth="640" wrapText="true" textAlignment="CENTER" alignment="CENTER"
|
||||||
style="-fx-font-family: 'Cinzel'; -fx-font-size: 12; -fx-letter-spacing: 3;
|
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)">
|
-fx-background-color: linear-gradient(to right, #f4c05a, #c8791a, #f4c05a)">
|
||||||
|
|||||||
Reference in New Issue
Block a user