diff --git a/src/main/java/edu/ntnu/idatt1002/k1g4/client/App.java b/src/main/java/edu/ntnu/idatt1002/k1g4/client/App.java index d77f2b77f9ec70f7b619c3660d9af343a8dea07f..29371d56c6283be094aa412d53b68ae07ed7b5d0 100644 --- a/src/main/java/edu/ntnu/idatt1002/k1g4/client/App.java +++ b/src/main/java/edu/ntnu/idatt1002/k1g4/client/App.java @@ -18,13 +18,13 @@ import java.io.IOException; * @version 0.1 */ public class App extends Application { - private static final int DEFAULT_WIDTH = 1080; - private static final int DEFAULT_HEIGHT = 720; + private static final int DEFAULT_WIDTH = 1600; + private static final int DEFAULT_HEIGHT = 900; @Override public void start(Stage stage) throws IOException { FXMLLoader fxmlLoader = new FXMLLoader(App.class.getClassLoader().getResource("home.fxml")); - Scene scene = new Scene(fxmlLoader.load()); + Scene scene = new Scene(fxmlLoader.load(), DEFAULT_WIDTH, DEFAULT_HEIGHT); stage.setTitle("javafx"); stage.setScene(scene); diff --git a/src/main/resources/home.fxml b/src/main/resources/home.fxml index faaa25488d437da7ee5bef2306a83633444c7f0c..290f67b68d1b179d8bec1e6e1004eead4f546b5f 100644 --- a/src/main/resources/home.fxml +++ b/src/main/resources/home.fxml @@ -3,16 +3,19 @@ <?import javafx.geometry.Insets?> <?import javafx.scene.control.Button?> <?import javafx.scene.layout.BorderPane?> +<?import javafx.scene.layout.ColumnConstraints?> +<?import javafx.scene.layout.GridPane?> +<?import javafx.scene.layout.HBox?> +<?import javafx.scene.layout.RowConstraints?> <?import javafx.scene.layout.VBox?> <?import javafx.scene.text.Font?> <?import javafx.scene.text.Text?> - -<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"> +<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="720.0" prefWidth="1080.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1"> <children> <BorderPane prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS"> <top> - <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Floorball tournament manager" wrappingWidth="511.9375" BorderPane.alignment="CENTER"> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="Floorball tournament manager" wrappingWidth="796.9375" BorderPane.alignment="CENTER"> <font> <Font size="22.0" /> </font> @@ -22,8 +25,50 @@ </Text> </top> <center> - <Button mnemonicParsing="false" prefHeight="128.0" prefWidth="329.0" text="Button" BorderPane.alignment="CENTER" /> + <GridPane alignment="BOTTOM_CENTER" prefHeight="598.0" prefWidth="1080.0" scaleX="0.8" scaleY="0.8" BorderPane.alignment="CENTER"> + <columnConstraints> + <ColumnConstraints hgrow="ALWAYS" minWidth="10.0" prefWidth="100.0" /> + </columnConstraints> + <rowConstraints> + <RowConstraints maxHeight="378.0" minHeight="10.0" prefHeight="242.0" valignment="CENTER" /> + <RowConstraints maxHeight="624.25" minHeight="10.0" prefHeight="421.0" /> + </rowConstraints> + <children> + <Button mnemonicParsing="false" prefHeight="242.0" prefWidth="759.0" text="New cup" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="TOP"> + <font> + <Font size="22.0" /> + </font> + <opaqueInsets> + <Insets /> + </opaqueInsets> + </Button> + <Text strokeType="OUTSIDE" strokeWidth="0.0" text="No previous cups. Click "New xup" to start." wrappingWidth="423.7890625" GridPane.halignment="CENTER" GridPane.valignment="BOTTOM"> + <GridPane.margin> + <Insets bottom="20.0" /> + </GridPane.margin> + <font> + <Font size="16.0" /> + </font> + </Text> + </children> + </GridPane> </center> + <bottom> + <HBox prefHeight="100.0" prefWidth="200.0" BorderPane.alignment="CENTER"> + <children> + <Button mnemonicParsing="false" prefHeight="50.0" prefWidth="112.0" text="Rules"> + <opaqueInsets> + <Insets right="20.0" /> + </opaqueInsets> + </Button> + <Button mnemonicParsing="false" prefHeight="51.0" prefWidth="105.0" text="Help"> + <opaqueInsets> + <Insets left="20.0" /> + </opaqueInsets> + </Button> + </children> + </HBox> + </bottom> </BorderPane> </children> </VBox>