Added server list updates, and added lobby

- Server list updates when a server is added/removed
- Player can host a server
- Lobby view shows players connected

Tags: #pair[mra106, hyi25] #story[1245]
This commit is contained in:
Michael Rausch
2017-09-07 19:20:36 +12:00
parent 8cc725616c
commit b35126ff4e
13 changed files with 280 additions and 170 deletions
+5
View File
@@ -1,5 +1,10 @@
#serverListCell {
-fx-background-color: -fx-pp-front-color;
-fx-effect: -fx-pp-dropshadow-light;
}
#serverListCell:hover {
-fx-effect: -fx-pp-dropshadow-dark;
}
#serverCellVBox {
+3
View File
@@ -10,6 +10,9 @@
-fx-pp-background-color: transparent;
-fx-pp-front-color: #fff;
-fx-font-family: "Baloo Tammudu";
-fx-pp-dropshadow-light: dropshadow(gaussian, rgba(0, 0, 0, 0.1), 10.0, 0.2, 3, 4);
-fx-pp-dropshadow-dark: dropshadow(gaussian, rgba(0, 0, 0, 0.3), 10.0, 0.2, 5, 6);
}
.jfx-text-field {
+2 -2
View File
@@ -33,7 +33,7 @@
</GridPane>
<GridPane>
<children>
<Label text="Party Parrots In Space" GridPane.valignment="CENTER">
<Label text="Party Parrots In Space" GridPane.valignment="CENTER" fx:id="serverName">
<font>
<Font size="31.0" />
</font>
@@ -41,7 +41,7 @@
<Insets left="35.0" top="10.0" />
</padding>
</Label>
<Label text="This is a map, it's called Haoming" GridPane.rowIndex="1">
<Label text="This is a map, it's called Haoming" GridPane.rowIndex="1" fx:id="mapName">
<padding>
<Insets left="35.0" top="-15.0" />
</padding>
@@ -51,7 +51,7 @@
<Label fx:id="mapName" text="Party parrots in space" GridPane.columnIndex="1" GridPane.rowIndex="1" />
</children>
</GridPane>
<JFXButton fx:id="serverConnButton" buttonType="RAISED" onAction="#createServer" prefHeight="39.0" prefWidth="123.0" text="JOIN GAME" GridPane.columnIndex="3" />
<JFXButton fx:id="serverConnButton" buttonType="RAISED" prefHeight="39.0" prefWidth="123.0" text="JOIN GAME" GridPane.columnIndex="3" />
<Label fx:id="serverPlayerCount" text="2/8 Players" GridPane.columnIndex="2" />
</children>
</GridPane>
@@ -23,7 +23,7 @@
</rowConstraints>
<children>
<Label fx:id="hostDialogHeader" text="Host a game..." GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<JFXButton fx:id="submitBtn" onAction="#createServer" prefHeight="45.0" prefWidth="220.0" text="Submit" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER" />
<JFXButton fx:id="submitBtn" prefHeight="45.0" prefWidth="220.0" text="Submit" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER" />
<JFXTextField fx:id="serverName" promptText="Server Name" GridPane.rowIndex="1">
<GridPane.margin>
<Insets left="30.0" right="30.0" />