Fixed: MinSize Setted
This commit is contained in:
@@ -82,8 +82,8 @@ public class GUI extends Application implements IView {
|
||||
showLogin();
|
||||
stage.setTitle("Mesos");
|
||||
primaryStage.setMaximized(true);
|
||||
primaryStage.setMinWidth(800);
|
||||
primaryStage.setMinHeight(600);
|
||||
primaryStage.setMinWidth(1583);
|
||||
primaryStage.setMinHeight(734);
|
||||
primaryStage.show();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ import javafx.geometry.Pos;
|
||||
import javafx.scene.Cursor;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.control.ScrollPane;
|
||||
import javafx.scene.effect.ColorAdjust;
|
||||
import javafx.scene.effect.DropShadow;
|
||||
import javafx.scene.image.*;
|
||||
@@ -347,7 +348,7 @@ public class MainFXMLController {
|
||||
}
|
||||
}
|
||||
|
||||
private void renderPlayer(Player player) {
|
||||
private void renderPlayer(Player player,VBox target) {
|
||||
VBox card = new VBox(3);
|
||||
VBox.setMargin(card, new Insets(5));
|
||||
card.getStyleClass().add("player-card");
|
||||
@@ -418,7 +419,7 @@ public class MainFXMLController {
|
||||
renderIcons(iconsRow1, iconsRow2, player);
|
||||
|
||||
card.getChildren().addAll(headerRow, statsRow, iconsRow1, iconsRow2);
|
||||
sidePanel.getChildren().add(card);
|
||||
target.getChildren().add(card);
|
||||
}
|
||||
|
||||
|
||||
@@ -520,7 +521,6 @@ public class MainFXMLController {
|
||||
VBox.setMargin(info, new Insets(5, 5, 5, 5));
|
||||
sidePanel.getChildren().add(info);
|
||||
|
||||
// ===== NUOVO: bottoni Skip Turn e Dettagli =====
|
||||
HBox buttonRow = new HBox(8);
|
||||
buttonRow.setAlignment(Pos.CENTER);
|
||||
VBox.setMargin(buttonRow, new Insets(0, 5, 5, 5));
|
||||
@@ -537,13 +537,23 @@ public class MainFXMLController {
|
||||
|
||||
buttonRow.getChildren().addAll(skipBtn, detailsBtn);
|
||||
sidePanel.getChildren().add(buttonRow);
|
||||
// ================================================
|
||||
|
||||
for (Player player : controller.miniModel.players.values()) {
|
||||
renderPlayer(player);
|
||||
// ← VBox separato solo per i player
|
||||
VBox playerList = new VBox(6);
|
||||
playerList.setFillWidth(true);
|
||||
for (Player p : controller.miniModel.players.values()) {
|
||||
renderPlayer(p, playerList); // ← passa playerList invece di sidePanel
|
||||
}
|
||||
}
|
||||
|
||||
ScrollPane scrollPane = new ScrollPane(playerList);
|
||||
scrollPane.setFitToWidth(true);
|
||||
scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
|
||||
scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.AS_NEEDED);
|
||||
scrollPane.setStyle("-fx-background: transparent; -fx-background-color: transparent;");
|
||||
VBox.setVgrow(scrollPane, Priority.ALWAYS);
|
||||
|
||||
sidePanel.getChildren().add(scrollPane);
|
||||
}
|
||||
|
||||
// ==== POPUP ====
|
||||
private void initPopup() {
|
||||
|
||||
Reference in New Issue
Block a user