Fix: changes to UI

This commit is contained in:
2026-05-06 14:47:09 +02:00
parent dbdb6a0e3e
commit dca9725e6a
3 changed files with 11 additions and 16 deletions
@@ -11,8 +11,7 @@ import java.util.List;
public class MainFXMLController { public class MainFXMLController {
@FXML @FXML private HBox board;
private HBox board;
@FXML private HBox upperList; @FXML private HBox upperList;
@FXML private HBox lowerList; @FXML private HBox lowerList;
@FXML private HBox myHand; @FXML private HBox myHand;
@@ -29,19 +28,16 @@ public class MainFXMLController {
for (TribeCard card : model.getUpperListTribeCards()) { for (TribeCard card : model.getUpperListTribeCards()) {
ImageView view = new ImageView(placeholder); ImageView view = new ImageView(placeholder);
view.setFitWidth(80); view.setFitHeight(250);
view.setFitHeight(120);
view.setPreserveRatio(true); view.setPreserveRatio(true);
upperList.getChildren().add(view); upperList.getChildren().add(view);
} }
for (TribeCard card : model.getLowerListTribeCards()) { for (TribeCard card : model.getLowerListTribeCards()) {
ImageView view = new ImageView(placeholder); ImageView view = new ImageView(placeholder);
view.setFitWidth(80); view.setFitHeight(250);
view.setFitHeight(120);
view.setPreserveRatio(true); view.setPreserveRatio(true);
lowerList.getChildren().add(view); lowerList.getChildren().add(view);
} }
System.out.println("AGGIORNO GAGAGAGA");
} }
} }
@@ -21,7 +21,7 @@ public class MainView {
FXMLLoader loader = new FXMLLoader( FXMLLoader loader = new FXMLLoader(
getClass().getResource("/GUIScene/main.fxml") getClass().getResource("/GUIScene/main.fxml")
); );
scene = new Scene(loader.load(), 350, 380); scene = new Scene(loader.load(), 1920, 1080);
fxmlController = loader.getController(); fxmlController = loader.getController();
} catch (IOException e) { } catch (IOException e) {
throw new RuntimeException("Impossibile caricare login.fxml", e); throw new RuntimeException("Impossibile caricare login.fxml", e);
+7 -8
View File
@@ -3,17 +3,16 @@
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<HBox maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1080.0" prefWidth="1920.0" xmlns="http://javafx.com/javafx/26" xmlns:fx="http://javafx.com/fxml/1" fx:controller="it.polimi.ingsw.gc14.View.GUI.MainFXMLController">
<HBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/26" xmlns:fx="http://javafx.com/fxml/1" fx:controller="it.polimi.ingsw.gc14.View.GUI.MainFXMLController">
<children> <children>
<VBox prefHeight="400.0" prefWidth="478.0"> <VBox prefHeight="1080.0" prefWidth="1486.0">
<children> <children>
<HBox fx:id="upperList" prefHeight="100.0" prefWidth="200.0" style="-fx-background-color: #91352d;" /> <HBox fx:id="upperList" prefHeight="250.0" prefWidth="200.0" style="-fx-background-color: #91352d;" />
<HBox fx:id="board" prefHeight="100.0" prefWidth="200.0" style="-fx-background-color: #2d3c91;" /> <HBox fx:id="board" prefHeight="250.0" prefWidth="200.0" style="-fx-background-color: #2d3c91;" />
<HBox fx:id="lowerList" prefHeight="100.0" prefWidth="200.0" style="-fx-background-color: #2d915b;" /> <HBox fx:id="lowerList" prefHeight="250.0" prefWidth="200.0" style="-fx-background-color: #2d915b;" />
<HBox fx:id="myHand" prefHeight="100.0" prefWidth="200.0" style="-fx-background-color: #8e912d;" /> <HBox fx:id="myHand" prefHeight="250.0" prefWidth="1324.0" style="-fx-background-color: #8e912d;" />
</children> </children>
</VBox> </VBox>
<VBox fx:id="playersHand" prefHeight="400.0" prefWidth="126.0" style="-fx-background-color: #742d91;" /> <VBox fx:id="playersHand" prefHeight="1080.0" prefWidth="531.0" style="-fx-background-color: #742d91;" />
</children> </children>
</HBox> </HBox>