diff --git a/bin/de/deadlocker8/roadgame/ui/PossibleTilesController.class b/bin/de/deadlocker8/roadgame/ui/PossibleTilesController.class index b731ce80406763fbbf987bec49d038ff13f35890..72a8a4499d27497d121956ff305a3e045b7bad6e 100644 Binary files a/bin/de/deadlocker8/roadgame/ui/PossibleTilesController.class and b/bin/de/deadlocker8/roadgame/ui/PossibleTilesController.class differ diff --git a/bin/de/deadlocker8/roadgame/ui/PossibleTilesGUI.fxml b/bin/de/deadlocker8/roadgame/ui/PossibleTilesGUI.fxml index a73dc920da8d17a2257511e42ab35c147b3b53f9..40fa33cb4cffdffd0c271d17888e8dec6380487a 100644 --- a/bin/de/deadlocker8/roadgame/ui/PossibleTilesGUI.fxml +++ b/bin/de/deadlocker8/roadgame/ui/PossibleTilesGUI.fxml @@ -1,22 +1,31 @@ <?xml version="1.0" encoding="UTF-8"?> +<?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.ScrollPane?> <?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.layout.FlowPane?> <?import javafx.scene.layout.VBox?> <?import javafx.scene.text.Font?> -<AnchorPane prefHeight="600.0" prefWidth="300.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.deadlocker8.roadgame.ui.PossibleTilesController"> +<AnchorPane prefHeight="500.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.deadlocker8.roadgame.ui.PossibleTilesController"> <children> - <ScrollPane layoutX="14.0" layoutY="14.0" AnchorPane.bottomAnchor="56.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0"> - <content> - <VBox fx:id="vbox" prefHeight="530.0" prefWidth="272.0" /> - </content> - </ScrollPane> - <Button fx:id="buttonBack" layoutX="119.0" layoutY="556.0" mnemonicParsing="false" onAction="#back" prefHeight="30.0" prefWidth="63.0" text="Back" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="119.0" AnchorPane.rightAnchor="118.0"> - <font> - <Font name="System Bold" size="14.0" /> - </font> - </Button> + <VBox alignment="TOP_CENTER" layoutX="14.0" layoutY="14.0" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0"> + <children> + <ScrollPane fx:id="scrollPane" VBox.vgrow="ALWAYS"> + <content> + <FlowPane fx:id="flowPane" prefHeight="418.0" prefWidth="565.0" /> + </content> + </ScrollPane> + <Button fx:id="buttonBack" mnemonicParsing="false" onAction="#back" prefHeight="30.0" prefWidth="70.0" text="Back"> + <font> + <Font name="System Bold" size="14.0" /> + </font> + <VBox.margin> + <Insets top="14.0" /> + </VBox.margin> + </Button> + </children> + </VBox> </children> </AnchorPane> diff --git a/bin/de/deadlocker8/roadgame/ui/SelectTilePackController$1.class b/bin/de/deadlocker8/roadgame/ui/SelectTilePackController$1.class index bedf680ac2b3bbcb2f66d1cf496c5d87a9bff893..690ca06b52dad6cab9a94d2386f4fcf4aa47c1d9 100644 Binary files a/bin/de/deadlocker8/roadgame/ui/SelectTilePackController$1.class and b/bin/de/deadlocker8/roadgame/ui/SelectTilePackController$1.class differ diff --git a/bin/de/deadlocker8/roadgame/ui/SelectTilePackController$2.class b/bin/de/deadlocker8/roadgame/ui/SelectTilePackController$2.class index c1e46d7ede0e2d0c9a75c6e25144c146a32a401f..86b2a5605f9b12afb3e9ab47b5b0898dde48a07b 100644 Binary files a/bin/de/deadlocker8/roadgame/ui/SelectTilePackController$2.class and b/bin/de/deadlocker8/roadgame/ui/SelectTilePackController$2.class differ diff --git a/bin/de/deadlocker8/roadgame/ui/SelectTilePackController.class b/bin/de/deadlocker8/roadgame/ui/SelectTilePackController.class index 75590e6be117f1f67f1ca6acff6be800c19e5561..6467685473a262965fdbfe36eff88916ae202b39 100644 Binary files a/bin/de/deadlocker8/roadgame/ui/SelectTilePackController.class and b/bin/de/deadlocker8/roadgame/ui/SelectTilePackController.class differ diff --git a/src/de/deadlocker8/roadgame/ui/PossibleTilesController.java b/src/de/deadlocker8/roadgame/ui/PossibleTilesController.java index 971691ec3cc2dca1511c94edb7964f1c24e34f78..5e49bd12bdc51861d78d13a5e20564b373228458 100644 --- a/src/de/deadlocker8/roadgame/ui/PossibleTilesController.java +++ b/src/de/deadlocker8/roadgame/ui/PossibleTilesController.java @@ -8,14 +8,16 @@ import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.control.Button; import javafx.scene.control.Label; +import javafx.scene.control.ScrollPane; +import javafx.scene.layout.FlowPane; import javafx.scene.layout.HBox; import javafx.scene.layout.StackPane; -import javafx.scene.layout.VBox; import javafx.stage.Stage; public class PossibleTilesController { - @FXML private VBox vbox; + @FXML private ScrollPane scrollPane; + @FXML private FlowPane flowPane; @FXML private Button buttonBack; private Stage stage; @@ -24,8 +26,11 @@ public class PossibleTilesController { this.stage = stage; - vbox.setSpacing(10.0); - vbox.setAlignment(Pos.TOP_CENTER); + flowPane.setVgap(25); + flowPane.setHgap(25); + + flowPane.prefWidthProperty().bind(scrollPane.widthProperty()); + flowPane.prefHeightProperty().bind(scrollPane.heightProperty()); for(TileType key : tilePack.getTiles().keySet()) { @@ -42,7 +47,7 @@ public class PossibleTilesController hbox.getChildren().add(currentStack); hbox.getChildren().add(labelTimes); HBox.setMargin(labelTimes, new Insets(0, 0, 0, 25)); - vbox.getChildren().add(hbox); + flowPane.getChildren().add(hbox); } } diff --git a/src/de/deadlocker8/roadgame/ui/PossibleTilesGUI.fxml b/src/de/deadlocker8/roadgame/ui/PossibleTilesGUI.fxml index a73dc920da8d17a2257511e42ab35c147b3b53f9..40fa33cb4cffdffd0c271d17888e8dec6380487a 100644 --- a/src/de/deadlocker8/roadgame/ui/PossibleTilesGUI.fxml +++ b/src/de/deadlocker8/roadgame/ui/PossibleTilesGUI.fxml @@ -1,22 +1,31 @@ <?xml version="1.0" encoding="UTF-8"?> +<?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> <?import javafx.scene.control.ScrollPane?> <?import javafx.scene.layout.AnchorPane?> +<?import javafx.scene.layout.FlowPane?> <?import javafx.scene.layout.VBox?> <?import javafx.scene.text.Font?> -<AnchorPane prefHeight="600.0" prefWidth="300.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.deadlocker8.roadgame.ui.PossibleTilesController"> +<AnchorPane prefHeight="500.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.60" xmlns:fx="http://javafx.com/fxml/1" fx:controller="de.deadlocker8.roadgame.ui.PossibleTilesController"> <children> - <ScrollPane layoutX="14.0" layoutY="14.0" AnchorPane.bottomAnchor="56.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0"> - <content> - <VBox fx:id="vbox" prefHeight="530.0" prefWidth="272.0" /> - </content> - </ScrollPane> - <Button fx:id="buttonBack" layoutX="119.0" layoutY="556.0" mnemonicParsing="false" onAction="#back" prefHeight="30.0" prefWidth="63.0" text="Back" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="119.0" AnchorPane.rightAnchor="118.0"> - <font> - <Font name="System Bold" size="14.0" /> - </font> - </Button> + <VBox alignment="TOP_CENTER" layoutX="14.0" layoutY="14.0" AnchorPane.bottomAnchor="14.0" AnchorPane.leftAnchor="14.0" AnchorPane.rightAnchor="14.0" AnchorPane.topAnchor="14.0"> + <children> + <ScrollPane fx:id="scrollPane" VBox.vgrow="ALWAYS"> + <content> + <FlowPane fx:id="flowPane" prefHeight="418.0" prefWidth="565.0" /> + </content> + </ScrollPane> + <Button fx:id="buttonBack" mnemonicParsing="false" onAction="#back" prefHeight="30.0" prefWidth="70.0" text="Back"> + <font> + <Font name="System Bold" size="14.0" /> + </font> + <VBox.margin> + <Insets top="14.0" /> + </VBox.margin> + </Button> + </children> + </VBox> </children> </AnchorPane> diff --git a/src/de/deadlocker8/roadgame/ui/SelectTilePackController.java b/src/de/deadlocker8/roadgame/ui/SelectTilePackController.java index 190e99a0d17700352ac8175a895c5d3d1c8560ae..d64c4973371d2c73e89f5b566d0bd3e7b2b6b988 100644 --- a/src/de/deadlocker8/roadgame/ui/SelectTilePackController.java +++ b/src/de/deadlocker8/roadgame/ui/SelectTilePackController.java @@ -78,8 +78,10 @@ public class SelectTilePackController newStage.initModality(Modality.APPLICATION_MODAL); newStage.setTitle("Possible Tiles"); newStage.setScene(new Scene(root)); + newStage.setMinWidth(400); + newStage.setMinHeight(400); newStage.getIcons().add(icon); - newStage.setResizable(false); + newStage.setResizable(true); PossibleTilesController newController = fxmlLoader.getController(); newController.init(newStage, controller, currentPack); newStage.show();