Added skybox & cleaned up server list UI

- Moved direct connect fields to a dialog as there was not enough room
- Moved room code to its own label
- Added a skybox texture to the game view
- Added the land mesh to the game view
This commit is contained in:
Michael Rausch
2017-09-25 18:25:24 +13:00
parent ca320f7fb8
commit 30dad8509e
13 changed files with 560 additions and 89 deletions
+2 -2
View File
@@ -38,14 +38,14 @@
-fx-font-size: 23px;
}
#connectButton, #roomConnectButton {
#connectButton, #roomConnectButton, #directConnectButton {
-fx-background-color: -fx-pp-light-text-color; /* inverted */
-fx-text-fill: -fx-pp-theme-color; /* inverted */
-fx-font-size: 20px;
-fx-pref-height: 45px;
}
#connectButton:hover, #roomConnectButton:hover {
#connectButton:hover, #roomConnectButton:hover, #directConnectButton:hover {
-fx-font-size: 23px;
}
@@ -0,0 +1,47 @@
#maxPlayersGridPane VBox * {
-fx-font-family: monospace !important;
}
#submitBtn {
-fx-background-color: -fx-pp-theme-color;
-fx-text-fill: -fx-pp-light-text-color;
-fx-font-size: 20px;
-fx-effect: -fx-pp-dropshadow-dark;
}
.jfx-rippler {
-jfx-rippler-fill: -fx-pp-light-theme-color; /* set rippler color for button */
}
#submitBtn:hover {
-fx-font-size: 23px;
-fx-background-color: -fx-pp-light-theme-color;
}
#hostDialogHeader {
-fx-font-size: 30px;
-fx-text-fill: -fx-pp-dark-text-color;
}
#serverName {
-jfx-focus-color: -fx-pp-dark-text-color;
-jfx-unfocus-color: -fx-pp-dark-text-color;
-fx-text-fill: -fx-pp-dark-text-color;
-fx-prompt-text-fill: -fx-pp-dark-text-color;
-fx-font-size: 16px;
}
#maxPlayersLabel {
-fx-text-fill: -fx-pp-dark-text-color;
-fx-font-size: 16px;
}
#maxPlayerPromptLabel {
-fx-text-fill: -fx-pp-dark-text-color;
-fx-font-size: 16px;
}
.maxPlayers {
-fx-font-size: 13px;
}
File diff suppressed because one or more lines are too long
+16 -9
View File
@@ -12,7 +12,8 @@
<?import javafx.scene.layout.StackPane?>
<?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.0.111" 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>
@@ -37,8 +38,7 @@
</GridPane>
<GridPane>
<children>
<Label fx:id="serverName" text="Party Parrots In Space"
GridPane.valignment="CENTER">
<Label fx:id="serverName" text="Party Parrots In Space" GridPane.valignment="CENTER">
<font>
<Font size="31.0" />
</font>
@@ -46,16 +46,23 @@
<Insets left="35.0" top="10.0" />
</padding>
</Label>
<Label fx:id="mapName" text="This is a map, it's called Haoming"
GridPane.rowIndex="1">
<Label fx:id="mapName" text="This is a map, it's called Haoming" GridPane.rowIndex="1">
<padding>
<Insets left="35.0" top="-15.0" />
</padding>
</Label>
<Label fx:id="roomLabel" text="Room: 2145" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<font>
<Font size="31.0" />
</font>
<GridPane.margin>
<Insets right="20.0" top="10.0" />
</GridPane.margin>
</Label>
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="732.0" minWidth="10.0" prefWidth="586.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="445.0" minWidth="10.0" prefWidth="314.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="50.0" prefHeight="74.0" vgrow="SOMETIMES" />
@@ -73,7 +80,7 @@
<children>
<ScrollPane fx:id="playerListScrollPane" hbarPolicy="NEVER" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<content>
<VBox fx:id="playerListVBox" prefHeight="200.0" prefWidth="100.0"/>
<VBox fx:id="playerListVBox" prefHeight="200.0" prefWidth="100.0" />
</content>
<GridPane.margin>
<Insets bottom="15.0" left="7.0" right="15.0" top="15.0" />
@@ -96,7 +103,7 @@
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
</rowConstraints>
<stylesheets>
<String fx:value="/css/Master.css"/>
<String fx:value="/css/Master.css" />
<String fx:value="/css/LobbyView.css" />
</stylesheets>
</GridPane>
+15 -37
View File
@@ -1,11 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.*?>
<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXTextField?>
<?import java.lang.String?>
@@ -19,62 +13,46 @@
<?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.ServerListController">
<StackPane fx:id="serverListMainStackPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.ServerListController">
<children>
<GridPane fx:id="serverListMainGridPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
<children>
<GridPane fx:id="connectGridPane" GridPane.rowIndex="2">
<GridPane fx:id="connectGridPane" prefHeight="79.0" prefWidth="900.0" GridPane.rowIndex="2">
<children>
<JFXButton fx:id="connectButton" buttonType="RAISED" prefHeight="45.0" prefWidth="220.0" ripplerFill="#3493e3" text="CONNECT" textFill="WHITE" GridPane.columnIndex="5" GridPane.halignment="RIGHT" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<JFXButton fx:id="directConnectButton" buttonType="RAISED" prefHeight="45.0" prefWidth="220.0" ripplerFill="#3493e3" text="Direct Connect" textFill="WHITE" GridPane.columnIndex="5" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="50.0" />
</GridPane.margin>
</JFXButton>
<JFXTextField fx:id="serverHostName" maxHeight="30.0" minHeight="30.0" prefHeight="30.0" promptText="Host Name" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets left="20.0" right="20.0" />
</GridPane.margin>
</JFXTextField>
<JFXTextField fx:id="serverPortNumber" maxHeight="30.0" minHeight="30.0" prefHeight="30.0" promptText="Port Number" GridPane.columnIndex="3" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets left="20.0" right="20.0" />
</GridPane.margin>
</JFXTextField>
<Label fx:id="connectLabel" text="Direct Connect:" GridPane.columnIndex="1" GridPane.halignment="RIGHT" GridPane.rowIndex="1" GridPane.valignment="CENTER">
<Label fx:id="connectLabel" text="Join Room: " GridPane.columnIndex="2" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="45.0" />
</GridPane.margin>
</Label>
<Label fx:id="connectLabel1" text="Connect to Room:" GridPane.columnIndex="2" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<JFXButton fx:id="roomConnectButton" prefHeight="45.0" prefWidth="220.0" text="Join Room" GridPane.columnIndex="4" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="45.0" top="5.0" />
</GridPane.margin>
</Label>
<JFXButton fx:id="roomConnectButton" buttonType="RAISED" prefHeight="45.0" prefWidth="220.0" text="CONNECT" GridPane.columnIndex="5" GridPane.halignment="RIGHT" GridPane.valignment="CENTER">
<GridPane.margin>
<Insets right="50.0" top="5.0" />
<Insets />
</GridPane.margin>
</JFXButton>
<JFXTextField fx:id="roomNumber" maxHeight="30.0" minHeight="30.0" prefHeight="30.0" promptText="Room Number" GridPane.columnIndex="3" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
<JFXTextField fx:id="roomNumber" promptText="Room Code" GridPane.columnIndex="3">
<GridPane.margin>
<Insets left="20.0" right="20.0" top="5.0" />
<Insets right="20.0" />
</GridPane.margin>
</JFXTextField>
</children>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="280.0" minWidth="180.0" prefWidth="180.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="320.0" minWidth="280.0" prefWidth="280.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="-Infinity" prefWidth="180.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="17.0" minWidth="17.0" prefWidth="17.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="273.0" minWidth="250.0" prefWidth="273.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="320.0" minWidth="70.0" prefWidth="110.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="258.0" minWidth="-Infinity" prefWidth="218.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="167.0" minWidth="17.0" prefWidth="167.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="273.0" minWidth="225.0" prefWidth="225.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
</GridPane>
<ScrollPane id="serverListPane" fx:id="serverListScrollPane" hbarPolicy="NEVER" prefHeight="1000.0" prefWidth="880.0" GridPane.rowIndex="1">
<ScrollPane id="serverListPane" fx:id="serverListScrollPane" hbarPolicy="NEVER" prefHeight="1000.0" prefWidth="900.0" GridPane.rowIndex="1">
<content>
<VBox id="serverListVBox" fx:id="serverListVBox" prefHeight="200.0" prefWidth="100.0">
<padding>
@@ -116,8 +94,8 @@
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="400.0" prefHeight="400.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="80.0" minHeight="125.0" prefHeight="80.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="400.0" prefHeight="459.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="120.0" minHeight="63.0" prefHeight="66.0" vgrow="SOMETIMES" />
</rowConstraints>
<stylesheets>
<String fx:value="/css/Master.css" />
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXDialogLayout?>
<?import com.jfoenix.controls.JFXTextField?>
<?import java.lang.String?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<JFXDialogLayout maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefWidth="550.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.dialogs.DirectConnectController">
<children>
<GridPane>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="90.0" minHeight="90.0" prefHeight="90.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="100.0" minHeight="60.0" prefHeight="66.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="140.0" minHeight="58.0" prefHeight="62.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="176.0" minHeight="100.0" prefHeight="172.0" vgrow="SOMETIMES" />
</rowConstraints>
<children>
<Label fx:id="hostDialogHeader" text="Direct Connect" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
<JFXButton fx:id="submitBtn" onMouseEntered="#playButtonHoverSound" prefHeight="55.0" prefWidth="250.0" text="CONNECT" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER" />
<JFXTextField fx:id="serverAddress" promptText="SERVER NAME" GridPane.rowIndex="1">
<GridPane.margin>
<Insets left="30.0" right="30.0" />
</GridPane.margin></JFXTextField>
<JFXTextField fx:id="portNumber" promptText="PORT NUMBER" GridPane.rowIndex="2">
<GridPane.margin>
<Insets left="30.0" right="30.0" />
</GridPane.margin>
</JFXTextField>
</children>
</GridPane>
</children>
<stylesheets>
<String fx:value="/css/dialogs/DirectConnect.css" />
<String fx:value="/css/Master.css" />
</stylesheets>
</JFXDialogLayout>