Added functionality to host game and join a game in lobby. Host name and game name are not implemented yet.

#story[1087]
This commit is contained in:
zwu18
2017-07-26 20:42:36 +12:00
parent 578f04c74f
commit 9c9b98f882
10 changed files with 93 additions and 13 deletions
@@ -21,8 +21,8 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<TextField fx:id="gameNameField" promptText="Enter game name" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.valignment="TOP" />
<TextField fx:id="hostNameField" promptText="Enter host name" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.valignment="BOTTOM" />
<TextField fx:id="gameNameField" promptText="Enter game name [DOES NOTHING ATM]" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.valignment="TOP" />
<TextField fx:id="hostNameField" promptText="Enter host name [DOES NOTHING ATM]" GridPane.columnIndex="1" GridPane.rowIndex="1" GridPane.valignment="BOTTOM" />
<Button fx:id="hostGameBtn" mnemonicParsing="false" onAction="#hostGamePressed" text="Host Game" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2">
<font>
<Font size="20.0" />
@@ -24,7 +24,7 @@
<columns>
<TableColumn fx:id="gameNameColumn" prefWidth="223.0" text="Game Name" />
<TableColumn fx:id="hostNameColumn" prefWidth="280.0" text="Host Name" />
<TableColumn fx:id="playerCountColumn" prefWidth="176.0" text="Number of Players" />
<TableColumn fx:id="statusColumn" prefWidth="176.0" text="Status" />
</columns>
<GridPane.margin>
<Insets left="50.0" right="50.0" />
@@ -40,11 +40,16 @@
<Insets left="50.0" />
</GridPane.margin>
</TextField>
<Button fx:id="joinGameBtn" mnemonicParsing="false" text="Connect to Game" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2">
<Button fx:id="joinGameBtn" mnemonicParsing="false" onAction="#connectSocket" text="Connect to Game" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="2">
<GridPane.margin>
<Insets right="50.0" />
</GridPane.margin>
</Button>
<Button mnemonicParsing="false" onAction="#refreshBtnPressed" text="Refresh" GridPane.columnIndex="1" GridPane.halignment="LEFT" GridPane.rowIndex="2">
<GridPane.margin>
<Insets left="80.0" />
</GridPane.margin>
</Button>
</children>
</GridPane>
</children>