Fixed: now main window and leaderboard contents are adapted to window size, Added: scrollable popup leaderboard

This commit is contained in:
rubenpirreram
2026-05-18 13:00:26 +02:00
parent 8f8491b1ad
commit e3d5f82ad0
4 changed files with 129 additions and 102 deletions
+67 -54
View File
@@ -3,6 +3,7 @@
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.control.ScrollPane?>
<HBox fx:id="mainHBox"
maxHeight="Infinity" maxWidth="Infinity"
prefHeight="1080.0" prefWidth="1920.0"
@@ -22,64 +23,76 @@
<Insets top="5" right="5" bottom="5" left="5" />
</HBox.margin>
<children>
<HBox fx:id="upperList" prefHeight="220" minHeight="220" maxHeight="220" styleClass="card-list">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />
</VBox.margin>
</HBox>
<HBox fx:id="board" prefHeight="255" minHeight="255" maxHeight="255" styleClass="card-list">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />
</VBox.margin>
</HBox>
<HBox fx:id="lowerList" prefHeight="220" minHeight="220" maxHeight="220" styleClass="card-list">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />
</VBox.margin>
</HBox>
<HBox fx:id="myHand" prefHeight="220" minHeight="220" maxHeight="220" styleClass="card-list">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />
</VBox.margin>
</HBox>
<HBox fx:id="upperList" styleClass="card-list" VBox.vgrow="ALWAYS">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />
</VBox.margin>
</HBox>
<HBox fx:id="board" prefHeight="255" minHeight="255" maxHeight="255" styleClass="card-list" VBox.vgrow="NEVER">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />
</VBox.margin>
</HBox>
<HBox fx:id="lowerList" styleClass="card-list" VBox.vgrow="ALWAYS">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />
</VBox.margin>
</HBox>
<HBox fx:id="myHand" styleClass="card-list" VBox.vgrow="ALWAYS">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />
</VBox.margin>
</HBox>
</children>
</VBox>
<!-- VBox destra: dimensione fissa, non si espande -->
<VBox fx:id="sidePanel"
prefWidth="250.0"
maxWidth="250.0"
minWidth="250.0"
HBox.hgrow="NEVER"
styleClass="side-panel">
<HBox.margin>
<Insets bottom="10" left="10" right="10" top="10" />
</HBox.margin>
<children>
<HBox fx:id="info" prefHeight="107.0" prefWidth="483.0" styleClass="frame">
<children>
<VBox alignment="CENTER" prefHeight="107.0" prefWidth="161.0" spacing="2">
<children>
<Label styleClass="label-medium" text="Era" />
<Label fx:id="era" styleClass="label-medium" text="VALORE" />
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="107.0" prefWidth="161.0" spacing="2">
<children>
<Label styleClass="label-medium" text="Round" />
<Label fx:id="round" styleClass="label-medium" text="VALORE" />
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="107.0" prefWidth="161.0" spacing="2">
<children>
<Label styleClass="label-medium" text="Player" />
<Label fx:id="player" styleClass="label-medium" text="VALORE" />
</children>
</VBox>
</children>
</HBox>
</children>
</VBox>
<VBox fx:id="sidePanel"
prefWidth="250.0"
maxWidth="250.0"
minWidth="250.0"
HBox.hgrow="NEVER"
styleClass="side-panel">
<HBox.margin>
<Insets bottom="10" left="10" right="10" top="10" />
</HBox.margin>
<children>
<ScrollPane fitToWidth="true" hbarPolicy="NEVER" vbarPolicy="AS_NEEDED" VBox.vgrow="ALWAYS">
<content>
<VBox spacing="10">
<children>
<HBox fx:id="info" prefHeight="107.0" prefWidth="483.0" styleClass="frame">
<children>
<VBox alignment="CENTER" prefHeight="107.0" prefWidth="161.0" spacing="2">
<children>
<Label styleClass="label-medium" text="Era" />
<Label fx:id="era" styleClass="label-medium" text="VALORE" />
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="107.0" prefWidth="161.0" spacing="2">
<children>
<Label styleClass="label-medium" text="Round" />
<Label fx:id="round" styleClass="label-medium" text="VALORE" />
</children>
</VBox>
<VBox alignment="CENTER" prefHeight="107.0" prefWidth="161.0" spacing="2">
<children>
<Label styleClass="label-medium" text="Player" />
<Label fx:id="player" styleClass="label-medium" text="VALORE" />
</children>
</VBox>
</children>
</HBox>
<!-- altri elementi qui sotto -->
</children>
</VBox>
</content>
</ScrollPane>
</children>
</VBox>
</children>
</HBox>