Added token information to the lobby screen.

#implement #story[1293]
This commit is contained in:
Calum
2017-09-28 05:09:54 +13:00
parent ba768deabc
commit b9cb6fa5b4
3 changed files with 138 additions and 82 deletions
+116 -58
View File
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.*?>
<?import com.jfoenix.controls.*?>
<?import java.lang.*?>
<?import javafx.geometry.*?>
@@ -19,10 +20,7 @@
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>
<StackPane fx:id="serverListMainStackPane" maxHeight="1.7976931348623157E308"
maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity"
xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="seng302.visualiser.controllers.LobbyController">
<StackPane fx:id="serverListMainStackPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.LobbyController">
<children>
<GridPane fx:id="serverListMainGridPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
<children>
@@ -81,87 +79,147 @@
</GridPane>
<GridPane GridPane.rowIndex="1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="222.0" minWidth="222.0" prefWidth="222.0" />
<ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="400.0" minWidth="400.0" prefWidth="400.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="350.0" minWidth="350.0" prefWidth="350.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints vgrow="SOMETIMES" />
</rowConstraints>
<children>
<ScrollPane fx:id="playerListScrollPane" hbarPolicy="NEVER"
GridPane.columnIndex="2" GridPane.halignment="CENTER"
GridPane.valignment="CENTER">
<ScrollPane fx:id="playerListScrollPane" hbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<content>
<VBox fx:id="playerListVBox" alignment="TOP_RIGHT"
prefHeight="200.0" prefWidth="100.0"/>
<VBox fx:id="playerListVBox" alignment="TOP_RIGHT" maxWidth="328.0" minWidth="328.0" prefWidth="328.0" />
</content>
<GridPane.margin>
<Insets bottom="15.0" left="7.0" right="15.0" top="15.0" />
</GridPane.margin>
<padding>
<Insets right="5.0" />
</padding>
</ScrollPane>
<AnchorPane fx:id="serverMap" style="-fx-background-color: skyblue;"
GridPane.columnIndex="1">
<AnchorPane fx:id="serverMap" style="-fx-background-color: skyblue;" GridPane.columnIndex="1">
<opaqueInsets>
<Insets />
</opaqueInsets>
<GridPane.margin>
<Insets bottom="15.0" left="15.0" right="7.0" top="15.0" />
<Insets bottom="15.0" left="7.0" right="7.0" top="15.0" />
</GridPane.margin>
</AnchorPane>
<AnchorPane>
<AnchorPane maxWidth="200.0" minWidth="200.0" prefHeight="370.0" prefWidth="200.0">
<GridPane.margin>
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0"/>
<Insets />
</GridPane.margin>
<children>
<GridPane prefHeight="370.0" prefWidth="259.0"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<GridPane prefHeight="370.0" prefWidth="189.0" style="-fx-border-color: black; -fx-grid-lines-visible: true;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="309.0" AnchorPane.topAnchor="0.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="123.0"
minWidth="-Infinity" prefWidth="60.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="175.0"
minWidth="-Infinity" prefWidth="170.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="80.0" prefWidth="80.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="110.0" prefWidth="110.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="116.0" minHeight="0.0"
prefHeight="40.0" vgrow="NEVER"/>
<RowConstraints maxHeight="285.0" minHeight="-Infinity"
prefHeight="60.0" vgrow="SOMETIMES"/>
<RowConstraints maxHeight="285.0" minHeight="-Infinity"
prefHeight="60.0" vgrow="SOMETIMES"/>
<RowConstraints maxHeight="141.0" minHeight="-Infinity"
prefHeight="60.0" vgrow="SOMETIMES"/>
<RowConstraints maxHeight="285.0" minHeight="-Infinity"
prefHeight="60.0" vgrow="SOMETIMES"/>
<RowConstraints maxHeight="285.0" minHeight="-Infinity"
prefHeight="60.0" vgrow="SOMETIMES"/>
<RowConstraints maxHeight="116.0" minHeight="0.0" prefHeight="40.0" vgrow="NEVER" />
<RowConstraints maxHeight="285.0" minHeight="-Infinity" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="285.0" minHeight="-Infinity" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="141.0" minHeight="-Infinity" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="285.0" minHeight="-Infinity" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="285.0" minHeight="-Infinity" prefHeight="60.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Tokens"
GridPane.columnSpan="2147483647"
GridPane.halignment="CENTER"/>
<Pane fx:id="speedTokenPane" prefHeight="200.0"
prefWidth="200.0" GridPane.rowIndex="1"/>
<Pane fx:id="handlingTokenPane" prefHeight="200.0"
prefWidth="200.0" GridPane.rowIndex="2"/>
<Pane fx:id="windWalkerTokenPane" prefHeight="200.0"
prefWidth="200.0" GridPane.rowIndex="3"/>
<Pane fx:id="randomTokenPane" prefHeight="200.0"
prefWidth="200.0" GridPane.rowIndex="5"/>
<Pane fx:id="bumperTokenPane" prefHeight="200.0"
prefWidth="200.0" GridPane.rowIndex="4"/>
<Label text="Speed" GridPane.columnIndex="1"
GridPane.rowIndex="1"/>
<Label text="Handling" GridPane.columnIndex="1"
GridPane.rowIndex="2"/>
<Label text="Wind Walker" GridPane.columnIndex="1"
GridPane.rowIndex="3"/>
<Label text="Bumper" GridPane.columnIndex="1"
GridPane.rowIndex="4"/>
<Label text="Random" GridPane.columnIndex="1"
GridPane.rowIndex="5"/>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Token" GridPane.halignment="CENTER">
<font>
<Font name="System Bold" size="18.0" />
</font></Text>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Ability" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<font>
<Font name="System Bold" size="18.0" />
</font>
</Text>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.rowIndex="1">
<children>
<Label alignment="BOTTOM_CENTER" text="Speed" StackPane.alignment="BOTTOM_CENTER">
<font>
<Font size="12.0" />
</font>
<padding>
<Insets bottom="5.0" />
</padding>
</Label>
<Pane fx:id="speedTokenPane" prefHeight="999.0" prefWidth="200.0" />
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.rowIndex="2">
<children>
<Label alignment="BOTTOM_CENTER" text="Handling" StackPane.alignment="BOTTOM_CENTER">
<font>
<Font size="12.0" />
</font>
<padding>
<Insets bottom="5.0" />
</padding>
</Label>
<Pane fx:id="handlingTokenPane" prefHeight="999.0" prefWidth="200.0" />
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.rowIndex="3">
<children>
<Label alignment="BOTTOM_CENTER" text="Wind Walker" StackPane.alignment="BOTTOM_CENTER">
<font>
<Font size="12.0" />
</font>
<padding>
<Insets bottom="5.0" />
</padding>
</Label>
<Pane fx:id="windWalkerTokenPane" prefHeight="999.0" prefWidth="200.0" />
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.rowIndex="4">
<children>
<Label alignment="BOTTOM_CENTER" text="Bumper" StackPane.alignment="BOTTOM_CENTER">
<font>
<Font size="12.0" />
</font>
<padding>
<Insets bottom="5.0" />
</padding>
</Label>
<Pane fx:id="bumperTokenPane" prefHeight="999.0" prefWidth="200.0" />
</children>
</StackPane>
<StackPane prefHeight="150.0" prefWidth="200.0" GridPane.rowIndex="5">
<children>
<Label alignment="BOTTOM_CENTER" text="Random" StackPane.alignment="BOTTOM_CENTER">
<font>
<Font size="12.0" />
</font>
<padding>
<Insets bottom="5.0" />
</padding>
</Label>
<Pane fx:id="randomTokenPane" prefHeight="999.0" prefWidth="60.0" />
</children>
</StackPane>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Increases your speed and acceleration" textAlignment="CENTER" wrappingWidth="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets />
</GridPane.margin>
</Text>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Decreases your turning circle" textAlignment="CENTER" wrappingWidth="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets />
</GridPane.margin>
</Text>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="The wind follows you at the optimal angle" textAlignment="CENTER" wrappingWidth="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets />
</GridPane.margin>
</Text>
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Hitting another yacht will temporarily disable it" textAlignment="CENTER" wrappingWidth="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER" />
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="50/50 chance for a random token or self slow" textAlignment="CENTER" wrappingWidth="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="5" GridPane.valignment="CENTER" />
</children>
<padding>
<Insets bottom="15.0" left="15.0" right="7.0" top="15.0" />
</padding>
</GridPane>
</children>
</AnchorPane>
+14 -13
View File
@@ -1,5 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import java.lang.String?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
@@ -8,33 +12,30 @@
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<VBox fx:id="playerCellVBox" maxHeight="-Infinity" maxWidth="1.7976931348623157E308"
minHeight="-Infinity" minWidth="-Infinity" prefHeight="80.0"
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1">
<VBox fx:id="playerCellVBox" maxHeight="-Infinity" maxWidth="340.0" minHeight="-Infinity" minWidth="340.0" prefHeight="80.0" prefWidth="340.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<stylesheets>
<String fx:value="/css/Master.css"/>
<String fx:value="/css/cells/PlayerCell.css"/>
<String fx:value="/css/Master.css" />
<String fx:value="/css/cells/PlayerCell.css" />
</stylesheets>
<children>
<GridPane fx:id="playerListCell" maxHeight="-Infinity" maxWidth="1.7976931348623157E308"
minHeight="-Infinity" prefHeight="70.0">
<GridPane fx:id="playerListCell" maxHeight="-Infinity" maxWidth="1.7976931348623157E308" minHeight="-Infinity" prefHeight="70.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="80.0" prefWidth="80.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="290.0" minWidth="290.0"
prefWidth="290.0"/>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="80.0" prefWidth="80.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="260.0" minWidth="260.0" prefWidth="260.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES"/>
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label fx:id="playerName" text="Party parrots in space" GridPane.columnIndex="1">
<padding>
<Insets left="20.0" />
</padding></Label>
<Pane fx:id="boatPane" prefHeight="200.0" prefWidth="200.0"/>
<Pane fx:id="boatPane" prefHeight="200.0" prefWidth="200.0" />
</children>
<VBox.margin>
<Insets right="40.0"/>
<Insets right="40.0" />
</VBox.margin>
</GridPane>
</children>