Fixed: Bar first implementation

This commit is contained in:
rubenpirreram
2026-05-20 23:39:40 +02:00
parent 131bd10e6d
commit 9d5710c533
2 changed files with 4 additions and 3 deletions
@@ -40,6 +40,7 @@ import java.util.*;
public class MainFXMLController {
@FXML private HBox currentStateBar;
@FXML private ScrollPane playerSide;
@FXML private HBox mainHBox;
@FXML private HBox board;
@@ -559,6 +560,8 @@ public class MainFXMLController {
}
private void renderSidePanel() {
currentStateBar.getChildren().clear();
currentStateBar.getChildren().add(new Label("Round:"+controller.miniModel.currentState.getRound()));
era.setText(Integer.toString(controller.miniModel.currentState.getEra()));
round.setText(Integer.toString(controller.miniModel.currentState.getRound()));
player.setText(controller.miniModel.currentState.getCurrentPlayer().getUserName());
+1 -3
View File
@@ -13,9 +13,6 @@
fx:controller="it.polimi.ingsw.gc14.View.GUI.MainFXMLController"
stylesheets="@styles.css">
<children>
<HBox maxHeight="30" minHeight="30" prefHeight="30">
</HBox>
<!-- VBox sinistra: si espande per riempire tutto lo spazio disponibile -->
<VBox alignment="CENTER"
fillWidth="false"
@@ -26,6 +23,7 @@
<Insets top="5" right="5" bottom="5" left="5" />
</HBox.margin>
<children>
<HBox fx:id="currentStateBar" style="-fx-background-color: #ffffff59" maxHeight="30" minHeight="30" prefHeight="30" alignment="CENTER" />
<HBox fx:id="upperList" styleClass="card-list" VBox.vgrow="ALWAYS">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />