mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56d18ad8ad | |||
| 4ec23a1785 | |||
| 37e4fe4ce7 | |||
| 8b7407bf89 |
@@ -80,12 +80,14 @@ public class App extends Application {
|
|||||||
ViewManager.getInstance().initialiseSplashScreen(primaryStage);
|
ViewManager.getInstance().initialiseSplashScreen(primaryStage);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void runDiscoveryServer(){
|
private static void runDiscoveryServer() throws Exception {
|
||||||
try{
|
while (true){
|
||||||
new DiscoveryServer();
|
try {
|
||||||
}
|
new DiscoveryServer();
|
||||||
catch (Exception e){
|
}
|
||||||
runDiscoveryServer();
|
catch (Exception ignored){
|
||||||
|
;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,11 +11,13 @@ import seng302.discoveryServer.util.ServerRepoStreamParser;
|
|||||||
import seng302.discoveryServer.util.ServerTable;
|
import seng302.discoveryServer.util.ServerTable;
|
||||||
import seng302.visualiser.ServerListener;
|
import seng302.visualiser.ServerListener;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.net.ServerSocket;
|
import java.net.ServerSocket;
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
import java.util.Timer;
|
||||||
|
|
||||||
public class DiscoveryServer {
|
public class DiscoveryServer {
|
||||||
public static final String ANSI_GREEN = "\u001B[32m";
|
public static final String ANSI_GREEN = "\u001B[32m";
|
||||||
@@ -27,6 +29,7 @@ public class DiscoveryServer {
|
|||||||
|
|
||||||
private ServerTable serverTable;
|
private ServerTable serverTable;
|
||||||
public static final Integer PORT_NUMBER = 9969;
|
public static final Integer PORT_NUMBER = 9969;
|
||||||
|
private ServerSocket serverSocket;
|
||||||
|
|
||||||
private final Logger logger = LoggerFactory.getLogger(DiscoveryServer.class);
|
private final Logger logger = LoggerFactory.getLogger(DiscoveryServer.class);
|
||||||
|
|
||||||
@@ -56,8 +59,6 @@ public class DiscoveryServer {
|
|||||||
displayHeader();
|
displayHeader();
|
||||||
serverTable = new ServerTable();
|
serverTable = new ServerTable();
|
||||||
|
|
||||||
ServerSocket serverSocket;
|
|
||||||
|
|
||||||
try{
|
try{
|
||||||
serverSocket = new ServerSocket(PORT_NUMBER);
|
serverSocket = new ServerSocket(PORT_NUMBER);
|
||||||
}
|
}
|
||||||
@@ -69,12 +70,17 @@ public class DiscoveryServer {
|
|||||||
|
|
||||||
logger.info("Started successfully - Now accepting connections");
|
logger.info("Started successfully - Now accepting connections");
|
||||||
|
|
||||||
while (true){
|
try{
|
||||||
Socket clientSocket = serverSocket.accept();
|
while (true){
|
||||||
|
Socket clientSocket = serverSocket.accept();
|
||||||
|
|
||||||
parseRequest(clientSocket);
|
parseRequest(clientSocket);
|
||||||
|
|
||||||
clientSocket.close();
|
clientSocket.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e){
|
||||||
|
close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,6 +153,18 @@ public class DiscoveryServer {
|
|||||||
tries++;
|
tries++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (serverToJoin != null && serverToJoin.isMaxPlayersReached()){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return serverToJoin;
|
return serverToJoin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void close(){
|
||||||
|
try {
|
||||||
|
serverSocket.close();
|
||||||
|
} catch (IOException ignored) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
|
|||||||
private boolean terminated;
|
private boolean terminated;
|
||||||
|
|
||||||
private Thread thread;
|
private Thread thread;
|
||||||
|
private boolean hasStarted = false;
|
||||||
|
|
||||||
private ServerSocket serverSocket = null;
|
private ServerSocket serverSocket = null;
|
||||||
private ArrayList<ServerToClientThread> serverToClientThreads = new ArrayList<>();
|
private ArrayList<ServerToClientThread> serverToClientThreads = new ArrayList<>();
|
||||||
@@ -98,6 +99,8 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
|
|||||||
new HeartbeatThread(this);
|
new HeartbeatThread(this);
|
||||||
new ServerListenThread(serverSocket, this);
|
new ServerListenThread(serverSocket, this);
|
||||||
|
|
||||||
|
hasStarted = true;
|
||||||
|
|
||||||
//You should handle interrupts in some way, so that the thread won't keep on forever if you exit the app.
|
//You should handle interrupts in some way, so that the thread won't keep on forever if you exit the app.
|
||||||
while (!terminated) {
|
while (!terminated) {
|
||||||
if (GameState.getPlayerHasLeftFlag()) {
|
if (GameState.getPlayerHasLeftFlag()) {
|
||||||
@@ -146,8 +149,10 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
for (ServerToClientThread serverToClientThread : serverToClientThreads) {
|
synchronized (this){
|
||||||
serverToClientThread.terminate();
|
for (ServerToClientThread serverToClientThread : serverToClientThreads) {
|
||||||
|
serverToClientThread.terminate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
serverSocket.close();
|
serverSocket.close();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
@@ -450,4 +455,8 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasStarted() {
|
||||||
|
return hasStarted;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ public class ServerYacht {
|
|||||||
* @param secondsElapsed The seconds elapsed since the last update of this yacht
|
* @param secondsElapsed The seconds elapsed since the last update of this yacht
|
||||||
*/
|
*/
|
||||||
public void updateLocation(Double secondsElapsed) {
|
public void updateLocation(Double secondsElapsed) {
|
||||||
|
//test
|
||||||
lastLocation = location;
|
lastLocation = location;
|
||||||
location = GeoUtility.getGeoCoordinate(location, heading, currentVelocity * secondsElapsed);
|
location = GeoUtility.getGeoCoordinate(location, heading, currentVelocity * secondsElapsed);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,14 @@
|
|||||||
package seng302.visualiser;
|
package seng302.visualiser;
|
||||||
|
|
||||||
|
import javafx.application.Platform;
|
||||||
|
import javafx.util.Pair;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import seng302.gameServer.messages.*;
|
||||||
|
import seng302.model.stream.packets.PacketType;
|
||||||
|
import seng302.model.stream.packets.StreamPacket;
|
||||||
|
import seng302.utilities.XMLParser;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@@ -42,6 +51,8 @@ import seng302.visualiser.controllers.ViewManager;
|
|||||||
*/
|
*/
|
||||||
public class ClientToServerThread implements Runnable {
|
public class ClientToServerThread implements Runnable {
|
||||||
|
|
||||||
|
private boolean isStarted = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Functional interface for receiving packets from client socket.
|
* Functional interface for receiving packets from client socket.
|
||||||
*/
|
*/
|
||||||
@@ -117,6 +128,8 @@ public class ClientToServerThread implements Runnable {
|
|||||||
* variable is false.
|
* variable is false.
|
||||||
*/
|
*/
|
||||||
public void run() {
|
public void run() {
|
||||||
|
isStarted = true;
|
||||||
|
|
||||||
int sync1;
|
int sync1;
|
||||||
int sync2;
|
int sync2;
|
||||||
// TODO: 14/07/17 wmu16 - Work out how to fix this while loop
|
// TODO: 14/07/17 wmu16 - Work out how to fix this while loop
|
||||||
@@ -167,8 +180,10 @@ public class ClientToServerThread implements Runnable {
|
|||||||
notifyDisconnectListeners("Connection to server was terminated");
|
notifyDisconnectListeners("Connection to server was terminated");
|
||||||
closeSocket();
|
closeSocket();
|
||||||
|
|
||||||
ViewManager.getInstance().goToStartView();
|
Platform.runLater(() -> {
|
||||||
ViewManager.getInstance().showErrorSnackBar("Server rejected connection.");
|
ViewManager.getInstance().showErrorSnackBar("Server rejected connection.");
|
||||||
|
ViewManager.getInstance().goToStartView();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendCustomizationRequest(CustomizeRequestType reqType, byte[] payload) {
|
public void sendCustomizationRequest(CustomizeRequestType reqType, byte[] payload) {
|
||||||
@@ -194,12 +209,6 @@ public class ClientToServerThread implements Runnable {
|
|||||||
if (connectionErrorListener != null){
|
if (connectionErrorListener != null){
|
||||||
connectionErrorListener.notifyConnectionError(message);
|
connectionErrorListener.notifyConnectionError(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
this.socket.close();
|
|
||||||
} catch (IOException e) {
|
|
||||||
logger.error("Couldn't close socket");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -390,9 +399,9 @@ public class ClientToServerThread implements Runnable {
|
|||||||
}
|
}
|
||||||
if (currentByte == -1) {
|
if (currentByte == -1) {
|
||||||
notifyDisconnectListeners("Cannot read from server.");
|
notifyDisconnectListeners("Cannot read from server.");
|
||||||
closeSocket();
|
|
||||||
logger.warn("InputStream reach end of stream", 1);
|
logger.warn("InputStream reach end of stream", 1);
|
||||||
handleConnectionError("Could not connect to server. Server is no longer available.");
|
handleConnectionError("Could not connect to server. Server is no longer available.");
|
||||||
|
closeSocket();
|
||||||
}
|
}
|
||||||
return currentByte;
|
return currentByte;
|
||||||
}
|
}
|
||||||
@@ -435,4 +444,8 @@ public class ClientToServerThread implements Runnable {
|
|||||||
).getBuffer()
|
).getBuffer()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean hasStarted() {
|
||||||
|
return isStarted;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ public class GameClient {
|
|||||||
|
|
||||||
getServerThread().setConnectionErrorListener((eMessage) -> {
|
getServerThread().setConnectionErrorListener((eMessage) -> {
|
||||||
ViewManager.getInstance().showErrorSnackBar(eMessage);
|
ViewManager.getInstance().showErrorSnackBar(eMessage);
|
||||||
destroyClientToServerThread();
|
//destroyClientToServerThread();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.lobbyController = ViewManager.getInstance().goToLobby(true);
|
this.lobbyController = ViewManager.getInstance().goToLobby(true);
|
||||||
@@ -147,18 +147,45 @@ public class GameClient {
|
|||||||
|
|
||||||
server = new MainServerThread();
|
server = new MainServerThread();
|
||||||
|
|
||||||
|
while (!server.hasStarted()){
|
||||||
|
try {
|
||||||
|
Thread.sleep(10);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
startClientToServerThread(ipAddress, 4942);
|
startClientToServerThread(ipAddress, 4942);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
showConnectionError("Cannot connect to server as host");
|
showConnectionError("Cannot connect to server as host");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Wait for C2S thread
|
||||||
|
while (!socketThread.hasStarted()){
|
||||||
|
try {
|
||||||
|
Thread.sleep(10);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
socketThread.sendXML(race, serverName, numLegs, maxPlayers, tokensEnabled);
|
socketThread.sendXML(race, serverName, numLegs, maxPlayers, tokensEnabled);
|
||||||
while (regattaData == null){
|
|
||||||
|
int triesLeft = 15;
|
||||||
|
|
||||||
|
while (regattaData == null && triesLeft > 0){
|
||||||
try {
|
try {
|
||||||
Thread.sleep(100);
|
Thread.sleep(100);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
triesLeft--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (triesLeft <= 0){
|
||||||
|
showConnectionError("Could not launch server");
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.lobbyController = ViewManager.getInstance().goToLobby(false);
|
this.lobbyController = ViewManager.getInstance().goToLobby(false);
|
||||||
|
|||||||
@@ -28,12 +28,12 @@ public class ServerCreationController implements Initializable {
|
|||||||
@FXML
|
@FXML
|
||||||
private JFXSlider maxPlayersSlider;
|
private JFXSlider maxPlayersSlider;
|
||||||
@FXML
|
@FXML
|
||||||
private Label maxPlayersLabel;
|
|
||||||
@FXML
|
|
||||||
private JFXButton submitBtn;
|
private JFXButton submitBtn;
|
||||||
@FXML
|
@FXML
|
||||||
private Label closeLabel;
|
private Label closeLabel;
|
||||||
@FXML
|
@FXML
|
||||||
|
private Label maxPlayersLabel;
|
||||||
|
@FXML
|
||||||
private JFXButton nextMapButton;
|
private JFXButton nextMapButton;
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton lastMapButton;
|
private JFXButton lastMapButton;
|
||||||
@@ -47,11 +47,10 @@ public class ServerCreationController implements Initializable {
|
|||||||
private JFXCheckBox pickupsCheckBox;
|
private JFXCheckBox pickupsCheckBox;
|
||||||
@FXML
|
@FXML
|
||||||
private AnchorPane mapHolder;
|
private AnchorPane mapHolder;
|
||||||
|
//---------FXML END---------//
|
||||||
|
|
||||||
private MapMaker mapMaker = MapMaker.getInstance();
|
private MapMaker mapMaker = MapMaker.getInstance();
|
||||||
|
|
||||||
//---------FXML END---------//
|
|
||||||
|
|
||||||
private List<ServerCreationDialogListener> serverCreationDialogListeners;
|
private List<ServerCreationDialogListener> serverCreationDialogListeners;
|
||||||
|
|
||||||
public void initialize(URL location, ResourceBundle resources) {
|
public void initialize(URL location, ResourceBundle resources) {
|
||||||
@@ -96,7 +95,7 @@ public class ServerCreationController implements Initializable {
|
|||||||
mapHolder.getChildren().setAll(mapMaker.getCurrentGameView());
|
mapHolder.getChildren().setAll(mapMaker.getCurrentGameView());
|
||||||
mapNameLabel.setText(mapMaker.getCurrentRegatta().getCourseName());
|
mapNameLabel.setText(mapMaker.getCurrentRegatta().getCourseName());
|
||||||
pickupsCheckBox.setSelected(true);
|
pickupsCheckBox.setSelected(true);
|
||||||
//closeLabel.setOnMouseClicked(event -> notifyListeners());
|
closeLabel.setOnMouseClicked(event -> notifyListeners());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -119,6 +118,12 @@ public class ServerCreationController implements Initializable {
|
|||||||
.runAsHost("localhost", 4941, serverName.getText(), (int) maxPlayersSlider
|
.runAsHost("localhost", 4941, serverName.getText(), (int) maxPlayersSlider
|
||||||
.getValue(), mapMaker.getCurrentRacePath(), (int) legsSlider.getValue(), pickupsCheckBox.isSelected());
|
.getValue(), mapMaker.getCurrentRacePath(), (int) legsSlider.getValue(), pickupsCheckBox.isSelected());
|
||||||
|
|
||||||
|
if (serverDescription == null){
|
||||||
|
ViewManager.getInstance().getGameClient().getServerThread().closeSocket();
|
||||||
|
ViewManager.getInstance().getGameClient().stopGame();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
ViewManager.getInstance().setProperty("serverName", serverDescription.getName());
|
ViewManager.getInstance().setProperty("serverName", serverDescription.getName());
|
||||||
ViewManager.getInstance().setProperty("mapName", serverDescription.getMapName());
|
ViewManager.getInstance().setProperty("mapName", serverDescription.getMapName());
|
||||||
}
|
}
|
||||||
@@ -128,7 +133,8 @@ public class ServerCreationController implements Initializable {
|
|||||||
*/
|
*/
|
||||||
private void updateMaxPlayerLabel() {
|
private void updateMaxPlayerLabel() {
|
||||||
maxPlayersSlider.setValue(Math.floor(maxPlayersSlider.getValue()));
|
maxPlayersSlider.setValue(Math.floor(maxPlayersSlider.getValue()));
|
||||||
maxPlayersLabel.setText(String.format("Max players: %.0f", maxPlayersSlider.getValue()));
|
maxPlayersLabel.setText(String
|
||||||
|
.format("Only %.0f players are allowed into the game", maxPlayersSlider.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateLegSliderLabel() {
|
private void updateLegSliderLabel() {
|
||||||
|
|||||||
@@ -2,6 +2,14 @@
|
|||||||
-fx-font-family: monospace !important;
|
-fx-font-family: monospace !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sliderLabel {
|
||||||
|
-fx-text-fill: -fx-pp-dark-text-color;
|
||||||
|
}
|
||||||
|
|
||||||
|
.error-label * {
|
||||||
|
-fx-text-fill: red;
|
||||||
|
}
|
||||||
|
|
||||||
#submitBtn {
|
#submitBtn {
|
||||||
-fx-background-color: -fx-pp-theme-color;
|
-fx-background-color: -fx-pp-theme-color;
|
||||||
-fx-text-fill: -fx-pp-light-text-color;
|
-fx-text-fill: -fx-pp-light-text-color;
|
||||||
@@ -32,12 +40,7 @@
|
|||||||
-fx-font-size: 16px;
|
-fx-font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#maxPlayersLabel {
|
.optionLabel {
|
||||||
-fx-text-fill: -fx-pp-dark-text-color;
|
|
||||||
-fx-font-size: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#maxPlayerPromptLabel {
|
|
||||||
-fx-text-fill: -fx-pp-dark-text-color;
|
-fx-text-fill: -fx-pp-dark-text-color;
|
||||||
-fx-font-size: 16px;
|
-fx-font-size: 16px;
|
||||||
}
|
}
|
||||||
@@ -55,3 +58,8 @@
|
|||||||
-fx-text-fill: red;
|
-fx-text-fill: red;
|
||||||
-fx-font-size: 33px;
|
-fx-font-size: 33px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JFXCheckBox {
|
||||||
|
-jfx-checked-color: -fx-pp-theme-color;
|
||||||
|
-fx-text-fill: -fx-pp-dark-text-color;
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -24,283 +24,281 @@
|
|||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<StackPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" style="-fx-background-color: skyblue;" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.RaceViewController">
|
<StackPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" style="-fx-background-color: skyblue;" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.RaceViewController">
|
||||||
<children>
|
|
||||||
<StackPane fx:id="contentStackPane" maxHeight="1.7976931348623157E308"
|
|
||||||
maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0"
|
|
||||||
prefWidth="1200.0" style="-fx-background-color: skyblue;" xmlns="http://javafx.com/javafx/8.0.111"
|
|
||||||
xmlns:fx="http://javafx.com/fxml/1">
|
|
||||||
<children>
|
<children>
|
||||||
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
<StackPane fx:id="contentStackPane" maxHeight="1.7976931348623157E308"
|
||||||
prefHeight="800.0" prefWidth="1200.0">
|
maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0"
|
||||||
<columnConstraints>
|
prefWidth="1200.0" style="-fx-background-color: skyblue;" xmlns="http://javafx.com/javafx/8.0.111"
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="250.0" minWidth="250.0"
|
xmlns:fx="http://javafx.com/fxml/1">
|
||||||
prefWidth="250.0"/>
|
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308"/>
|
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="400.0"
|
|
||||||
prefWidth="400.0"/>
|
|
||||||
</columnConstraints>
|
|
||||||
<rowConstraints>
|
|
||||||
<RowConstraints maxHeight="70.0" minHeight="70.0" prefHeight="70.0"
|
|
||||||
vgrow="SOMETIMES"/>
|
|
||||||
<RowConstraints maxHeight="1.7976931348623157E308" vgrow="SOMETIMES"/>
|
|
||||||
<RowConstraints maxHeight="250.0" minHeight="250.0" prefHeight="250.0"
|
|
||||||
valignment="BOTTOM" vgrow="SOMETIMES"/>
|
|
||||||
</rowConstraints>
|
|
||||||
<children>
|
<children>
|
||||||
<GridPane id="timerGrid" fx:id="timerGrid" prefWidth="192.0" styleClass="timer">
|
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||||
|
prefHeight="800.0" prefWidth="1200.0">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0"
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="250.0" minWidth="250.0"
|
||||||
prefWidth="50.0"/>
|
prefWidth="250.0"/>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="135.0" minWidth="135.0"
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308"/>
|
||||||
prefWidth="135.0"/>
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="400.0"
|
||||||
</columnConstraints>
|
prefWidth="400.0"/>
|
||||||
<rowConstraints>
|
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
|
||||||
</rowConstraints>
|
|
||||||
<opaqueInsets>
|
|
||||||
<Insets/>
|
|
||||||
</opaqueInsets>
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets left="10.0" right="200.0" top="10.0"/>
|
|
||||||
</GridPane.margin>
|
|
||||||
<children>
|
|
||||||
<ImageView fitHeight="40.0" fitWidth="40.0" pickOnBounds="true"
|
|
||||||
preserveRatio="true" GridPane.halignment="CENTER"
|
|
||||||
GridPane.valignment="CENTER">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/timer.png"/>
|
|
||||||
</image>
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets/>
|
|
||||||
</GridPane.margin>
|
|
||||||
</ImageView>
|
|
||||||
<Label fx:id="timerLabel" text="00:03:34" GridPane.columnIndex="1"
|
|
||||||
GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
|
||||||
<font>
|
|
||||||
<Font size="21.0"/>
|
|
||||||
</font>
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets/>
|
|
||||||
</GridPane.margin>
|
|
||||||
</Label>
|
|
||||||
</children>
|
|
||||||
</GridPane>
|
|
||||||
<GridPane GridPane.columnIndex="2">
|
|
||||||
<columnConstraints>
|
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
|
||||||
</columnConstraints>
|
|
||||||
<rowConstraints>
|
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
|
||||||
</rowConstraints>
|
|
||||||
</GridPane>
|
|
||||||
<GridPane fx:id="chatGridPane" GridPane.columnIndex="2" GridPane.rowIndex="2">
|
|
||||||
<columnConstraints>
|
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="390.0" minWidth="390.0"
|
|
||||||
prefWidth="390.0"/>
|
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="70.0" minHeight="70.0" prefHeight="70.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
<RowConstraints maxHeight="1.7976931348623157E308" vgrow="SOMETIMES"/>
|
<RowConstraints maxHeight="1.7976931348623157E308" vgrow="SOMETIMES"/>
|
||||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0"
|
<RowConstraints maxHeight="250.0" minHeight="250.0" prefHeight="250.0"
|
||||||
vgrow="SOMETIMES"/>
|
valignment="BOTTOM" vgrow="SOMETIMES"/>
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<Pane fx:id="chatHistoryHolder" prefHeight="200.0" prefWidth="200.0"
|
<GridPane id="timerGrid" fx:id="timerGrid" prefWidth="192.0" styleClass="timer">
|
||||||
GridPane.hgrow="ALWAYS" GridPane.valignment="BOTTOM"
|
|
||||||
GridPane.vgrow="ALWAYS">
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets/>
|
|
||||||
</GridPane.margin>
|
|
||||||
<padding>
|
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
|
||||||
</padding>
|
|
||||||
</Pane>
|
|
||||||
<GridPane fx:id="chatInputHolder" GridPane.rowIndex="1">
|
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0"
|
||||||
prefWidth="100.0"/>
|
prefWidth="50.0"/>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity"
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="135.0" minWidth="135.0"
|
||||||
minWidth="90.0" prefWidth="90.0"/>
|
prefWidth="135.0"/>
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0"
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||||
valignment="CENTER" vgrow="SOMETIMES"/>
|
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
|
||||||
<JFXButton fx:id="chatSend" alignment="CENTER" buttonType="RAISED"
|
|
||||||
focusTraversable="false" maxHeight="-Infinity"
|
|
||||||
maxWidth="1.7976931348623157E308" minHeight="-Infinity"
|
|
||||||
minWidth="-Infinity" prefHeight="35.0" text="SEND"
|
|
||||||
GridPane.columnIndex="1">
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
|
||||||
</GridPane.margin>
|
|
||||||
</JFXButton>
|
|
||||||
<JFXTextField fx:id="chatInput" focusTraversable="false"
|
|
||||||
maxHeight="35.0" minHeight="-Infinity" prefHeight="35.0">
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets bottom="10.0" left="20.0" right="10.0"/>
|
|
||||||
</GridPane.margin>
|
|
||||||
<padding>
|
|
||||||
<Insets right="15.0"/>
|
|
||||||
</padding>
|
|
||||||
</JFXTextField>
|
|
||||||
</children>
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets top="10.0"/>
|
|
||||||
</GridPane.margin>
|
|
||||||
</GridPane>
|
|
||||||
</children>
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets bottom="10.0" right="10.0"/>
|
|
||||||
</GridPane.margin>
|
|
||||||
</GridPane>
|
|
||||||
<GridPane fx:id="windGridPane" maxHeight="-Infinity" maxWidth="-Infinity"
|
|
||||||
prefHeight="150.0" prefWidth="240.0" GridPane.halignment="CENTER"
|
|
||||||
GridPane.rowIndex="2" GridPane.valignment="BOTTOM">
|
|
||||||
<columnConstraints>
|
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="110.0"
|
|
||||||
prefWidth="110.0"/>
|
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="132.0" minWidth="10.0"
|
|
||||||
prefWidth="132.0"/>
|
|
||||||
</columnConstraints>
|
|
||||||
<rowConstraints>
|
|
||||||
<RowConstraints maxHeight="120.0" minHeight="120.0" prefHeight="120.0"
|
|
||||||
vgrow="SOMETIMES"/>
|
|
||||||
<RowConstraints maxHeight="30.0" minHeight="30.0" prefHeight="30.0"
|
|
||||||
vgrow="SOMETIMES"/>
|
|
||||||
</rowConstraints>
|
|
||||||
<children>
|
|
||||||
<Label fx:id="positionLabel" text="Position:" GridPane.columnIndex="1"
|
|
||||||
GridPane.halignment="LEFT" GridPane.rowSpan="2" GridPane.valignment="TOP">
|
|
||||||
<padding>
|
|
||||||
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
|
||||||
</padding>
|
|
||||||
</Label>
|
|
||||||
<Label fx:id="boatSpeedLabel" text="Boat Speed:" GridPane.columnIndex="1"
|
|
||||||
GridPane.halignment="LEFT" GridPane.rowSpan="2"
|
|
||||||
GridPane.valignment="CENTER">
|
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets/>
|
<Insets/>
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
<padding>
|
<GridPane.margin>
|
||||||
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
<Insets left="10.0" right="200.0" top="10.0"/>
|
||||||
</padding>
|
</GridPane.margin>
|
||||||
</Label>
|
|
||||||
<Label fx:id="boatHeadingLabel" text="Boat Heading:"
|
|
||||||
GridPane.columnIndex="1" GridPane.halignment="LEFT" GridPane.rowSpan="2"
|
|
||||||
GridPane.valignment="BOTTOM">
|
|
||||||
<padding>
|
|
||||||
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
|
||||||
</padding>
|
|
||||||
</Label>
|
|
||||||
<GridPane fx:id="windHolder" GridPane.rowSpan="2">
|
|
||||||
<columnConstraints>
|
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
|
||||||
prefWidth="100.0"/>
|
|
||||||
</columnConstraints>
|
|
||||||
<rowConstraints>
|
|
||||||
<RowConstraints maxHeight="120.0" minHeight="120.0"
|
|
||||||
prefHeight="120.0" vgrow="SOMETIMES"/>
|
|
||||||
<RowConstraints maxHeight="30.0" minHeight="30.0" prefHeight="30.0"
|
|
||||||
vgrow="SOMETIMES"/>
|
|
||||||
</rowConstraints>
|
|
||||||
<children>
|
<children>
|
||||||
<ImageView fx:id="windImageView" fitHeight="92.0" fitWidth="109.0"
|
<ImageView fitHeight="40.0" fitWidth="40.0" pickOnBounds="true"
|
||||||
pickOnBounds="true" preserveRatio="true"
|
preserveRatio="true" GridPane.halignment="CENTER"
|
||||||
GridPane.halignment="CENTER" GridPane.rowSpan="2"
|
GridPane.valignment="CENTER">
|
||||||
GridPane.valignment="CENTER"/>
|
<image>
|
||||||
<Label fx:id="windSpeedLabel" text="0.0 Knots"
|
<Image url="@../images/timer.png"/>
|
||||||
GridPane.halignment="RIGHT" GridPane.rowIndex="1"
|
</image>
|
||||||
GridPane.valignment="CENTER">
|
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets right="5.0"/>
|
<Insets/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</Label>
|
</ImageView>
|
||||||
<Label fx:id="windDirectionLabel" text="180.0°"
|
<Label fx:id="timerLabel" text="00:03:34" GridPane.columnIndex="1"
|
||||||
GridPane.halignment="LEFT" GridPane.rowIndex="1"
|
GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
||||||
GridPane.valignment="CENTER">
|
<font>
|
||||||
|
<Font size="21.0"/>
|
||||||
|
</font>
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="5.0"/>
|
<Insets/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</Label>
|
</Label>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
<GridPane GridPane.columnIndex="2">
|
||||||
<opaqueInsets>
|
<columnConstraints>
|
||||||
<Insets/>
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||||
</opaqueInsets>
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||||
<GridPane.margin>
|
</columnConstraints>
|
||||||
<Insets bottom="10.0" left="10.0" top="40.0"/>
|
<rowConstraints>
|
||||||
</GridPane.margin>
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||||
</GridPane>
|
</rowConstraints>
|
||||||
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="2">
|
</GridPane>
|
||||||
<columnConstraints>
|
<GridPane fx:id="chatGridPane" GridPane.columnIndex="2" GridPane.rowIndex="2">
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="390.0" minWidth="390.0"
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
prefWidth="390.0"/>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
</columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
<rowConstraints>
|
||||||
</columnConstraints>
|
<RowConstraints maxHeight="1.7976931348623157E308" vgrow="SOMETIMES"/>
|
||||||
<rowConstraints>
|
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0"
|
||||||
<RowConstraints maxHeight="152.0" minHeight="10.0" prefHeight="152.0"
|
vgrow="SOMETIMES"/>
|
||||||
vgrow="SOMETIMES"/>
|
</rowConstraints>
|
||||||
<RowConstraints maxHeight="118.0" minHeight="10.0" prefHeight="98.0"
|
<children>
|
||||||
vgrow="SOMETIMES"/>
|
<Pane fx:id="chatHistoryHolder" prefHeight="200.0" prefWidth="200.0"
|
||||||
</rowConstraints>
|
GridPane.hgrow="ALWAYS" GridPane.valignment="BOTTOM"
|
||||||
<children>
|
GridPane.vgrow="ALWAYS">
|
||||||
<ImageView fx:id="velocityIcon" fitHeight="88.0" fitWidth="106.0"
|
<GridPane.margin>
|
||||||
pickOnBounds="true" preserveRatio="true" visible="false"
|
<Insets/>
|
||||||
GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
</GridPane.margin>
|
||||||
<image>
|
<padding>
|
||||||
<Image url="@../icons/velocity.png"/>
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||||
</image>
|
</padding>
|
||||||
</ImageView>
|
</Pane>
|
||||||
<ImageView fx:id="handlingIcon" fitHeight="87.0" fitWidth="98.0"
|
<GridPane fx:id="chatInputHolder" GridPane.rowIndex="1">
|
||||||
pickOnBounds="true" preserveRatio="true" visible="false"
|
<columnConstraints>
|
||||||
GridPane.columnIndex="1" GridPane.halignment="CENTER"
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||||
GridPane.rowIndex="1">
|
prefWidth="100.0"/>
|
||||||
<image>
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity"
|
||||||
<Image url="@../icons/handlingIcon.png"/>
|
minWidth="90.0" prefWidth="90.0"/>
|
||||||
</image>
|
</columnConstraints>
|
||||||
</ImageView>
|
<rowConstraints>
|
||||||
<ImageView fx:id="windWalkerIcon" fitHeight="83.0" fitWidth="100.0"
|
<RowConstraints maxHeight="50.0" minHeight="50.0" prefHeight="50.0"
|
||||||
pickOnBounds="true" preserveRatio="true" visible="false"
|
valignment="CENTER" vgrow="SOMETIMES"/>
|
||||||
GridPane.columnIndex="2" GridPane.halignment="CENTER"
|
</rowConstraints>
|
||||||
GridPane.rowIndex="1">
|
<children>
|
||||||
<image>
|
<JFXButton fx:id="chatSend" alignment="CENTER" buttonType="RAISED"
|
||||||
<Image url="@../icons/windWalkerIcon.png"/>
|
focusTraversable="false" maxHeight="-Infinity"
|
||||||
</image>
|
maxWidth="1.7976931348623157E308" minHeight="-Infinity"
|
||||||
</ImageView>
|
minWidth="-Infinity" prefHeight="35.0" text="SEND"
|
||||||
<ImageView fx:id="bumperIcon" fitHeight="83.0" fitWidth="88.0"
|
GridPane.columnIndex="1">
|
||||||
pickOnBounds="true" preserveRatio="true" visible="false"
|
<GridPane.margin>
|
||||||
GridPane.columnIndex="3" GridPane.halignment="CENTER"
|
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||||
GridPane.rowIndex="1">
|
</GridPane.margin>
|
||||||
<image>
|
</JFXButton>
|
||||||
<Image url="@../icons/bumperIcon.png"/>
|
<JFXTextField fx:id="chatInput" focusTraversable="false"
|
||||||
</image>
|
maxHeight="35.0" minHeight="-Infinity" prefHeight="35.0">
|
||||||
</ImageView>
|
<GridPane.margin>
|
||||||
<ImageView fx:id="badRandomIcon" fitHeight="69.0" fitWidth="103.0"
|
<Insets bottom="10.0" left="20.0" right="10.0"/>
|
||||||
pickOnBounds="true" preserveRatio="true" visible="false"
|
</GridPane.margin>
|
||||||
GridPane.columnIndex="4" GridPane.halignment="CENTER"
|
<padding>
|
||||||
GridPane.rowIndex="1" GridPane.valignment="CENTER">
|
<Insets right="15.0"/>
|
||||||
<image>
|
</padding>
|
||||||
<Image url="@../icons/slowedIcon.png"/>
|
</JFXTextField>
|
||||||
</image>
|
</children>
|
||||||
</ImageView>
|
<GridPane.margin>
|
||||||
|
<Insets top="10.0"/>
|
||||||
|
</GridPane.margin>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="10.0" right="10.0"/>
|
||||||
|
</GridPane.margin>
|
||||||
|
</GridPane>
|
||||||
|
<GridPane fx:id="windGridPane" maxHeight="-Infinity" maxWidth="-Infinity"
|
||||||
|
prefHeight="150.0" prefWidth="240.0" GridPane.halignment="CENTER"
|
||||||
|
GridPane.rowIndex="2" GridPane.valignment="BOTTOM">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0" minWidth="110.0"
|
||||||
|
prefWidth="110.0"/>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="132.0" minWidth="10.0"
|
||||||
|
prefWidth="132.0"/>
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="120.0" minHeight="120.0" prefHeight="120.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="30.0" prefHeight="30.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<Label fx:id="positionLabel" text="Position:" GridPane.columnIndex="1"
|
||||||
|
GridPane.halignment="LEFT" GridPane.rowSpan="2" GridPane.valignment="TOP">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="boatSpeedLabel" text="Boat Speed:" GridPane.columnIndex="1"
|
||||||
|
GridPane.halignment="LEFT" GridPane.rowSpan="2"
|
||||||
|
GridPane.valignment="CENTER">
|
||||||
|
<opaqueInsets>
|
||||||
|
<Insets/>
|
||||||
|
</opaqueInsets>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="boatHeadingLabel" text="Boat Heading:"
|
||||||
|
GridPane.columnIndex="1" GridPane.halignment="LEFT" GridPane.rowSpan="2"
|
||||||
|
GridPane.valignment="BOTTOM">
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<GridPane fx:id="windHolder" GridPane.rowSpan="2">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||||
|
prefWidth="100.0"/>
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="120.0" minHeight="120.0"
|
||||||
|
prefHeight="120.0" vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="30.0" minHeight="30.0" prefHeight="30.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<ImageView fx:id="windImageView" fitHeight="92.0" fitWidth="109.0"
|
||||||
|
pickOnBounds="true" preserveRatio="true"
|
||||||
|
GridPane.halignment="CENTER" GridPane.rowSpan="2"
|
||||||
|
GridPane.valignment="CENTER"/>
|
||||||
|
<Label fx:id="windSpeedLabel" text="0.0 Knots"
|
||||||
|
GridPane.halignment="RIGHT" GridPane.rowIndex="1"
|
||||||
|
GridPane.valignment="CENTER">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets right="5.0"/>
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
<Label fx:id="windDirectionLabel" text="180.0°"
|
||||||
|
GridPane.halignment="LEFT" GridPane.rowIndex="1"
|
||||||
|
GridPane.valignment="CENTER">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets left="5.0"/>
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
|
</children>
|
||||||
|
<opaqueInsets>
|
||||||
|
<Insets/>
|
||||||
|
</opaqueInsets>
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets bottom="10.0" left="10.0" top="40.0"/>
|
||||||
|
</GridPane.margin>
|
||||||
|
</GridPane>
|
||||||
|
<GridPane GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="152.0" minHeight="10.0" prefHeight="152.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="118.0" minHeight="10.0" prefHeight="98.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<ImageView fx:id="velocityIcon" fitHeight="88.0" fitWidth="106.0"
|
||||||
|
pickOnBounds="true" preserveRatio="true" visible="false"
|
||||||
|
GridPane.halignment="CENTER" GridPane.rowIndex="1">
|
||||||
|
<image>
|
||||||
|
<Image url="@../icons/velocity.png"/>
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
<ImageView fx:id="handlingIcon" fitHeight="87.0" fitWidth="98.0"
|
||||||
|
pickOnBounds="true" preserveRatio="true" visible="false"
|
||||||
|
GridPane.columnIndex="1" GridPane.halignment="CENTER"
|
||||||
|
GridPane.rowIndex="1">
|
||||||
|
<image>
|
||||||
|
<Image url="@../icons/handlingIcon.png"/>
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
<ImageView fx:id="windWalkerIcon" fitHeight="83.0" fitWidth="100.0"
|
||||||
|
pickOnBounds="true" preserveRatio="true" visible="false"
|
||||||
|
GridPane.columnIndex="2" GridPane.halignment="CENTER"
|
||||||
|
GridPane.rowIndex="1">
|
||||||
|
<image>
|
||||||
|
<Image url="@../icons/windWalkerIcon.png"/>
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
<ImageView fx:id="bumperIcon" fitHeight="83.0" fitWidth="88.0"
|
||||||
|
pickOnBounds="true" preserveRatio="true" visible="false"
|
||||||
|
GridPane.columnIndex="3" GridPane.halignment="CENTER"
|
||||||
|
GridPane.rowIndex="1">
|
||||||
|
<image>
|
||||||
|
<Image url="@../icons/bumperIcon.png"/>
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
<ImageView fx:id="badRandomIcon" fitHeight="69.0" fitWidth="103.0"
|
||||||
|
pickOnBounds="true" preserveRatio="true" visible="false"
|
||||||
|
GridPane.columnIndex="4" GridPane.halignment="CENTER"
|
||||||
|
GridPane.rowIndex="1" GridPane.valignment="CENTER">
|
||||||
|
<image>
|
||||||
|
<Image url="@../icons/slowedIcon.png"/>
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</StackPane>
|
||||||
</children>
|
<AnchorPane fx:id="loadingScreenPane">
|
||||||
</StackPane>
|
|
||||||
</children>
|
|
||||||
<AnchorPane fx:id="loadingScreenPane">
|
|
||||||
<children>
|
|
||||||
<ImageView fx:id="loadingScreen" fitHeight="672.0" fitWidth="1200.0" pickOnBounds="true" preserveRatio="true" />
|
<ImageView fx:id="loadingScreen" fitHeight="672.0" fitWidth="1200.0" pickOnBounds="true" preserveRatio="true" />
|
||||||
<JFXSpinner layoutX="566.0" layoutY="692.0" radius="30.0" />
|
<JFXSpinner layoutX="566.0" layoutY="692.0" radius="30.0" />
|
||||||
|
</AnchorPane>
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<String fx:value="/css/Master.css"/>
|
<String fx:value="/css/Master.css"/>
|
||||||
<String fx:value="/css/RaceView.css"/>
|
<String fx:value="/css/RaceView.css"/>
|
||||||
|
|||||||
@@ -5,16 +5,18 @@
|
|||||||
<?import com.jfoenix.controls.JFXDialogLayout?>
|
<?import com.jfoenix.controls.JFXDialogLayout?>
|
||||||
<?import com.jfoenix.controls.JFXSlider?>
|
<?import com.jfoenix.controls.JFXSlider?>
|
||||||
<?import com.jfoenix.controls.JFXTextField?>
|
<?import com.jfoenix.controls.JFXTextField?>
|
||||||
|
<?import java.net.URL?>
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.layout.ColumnConstraints?>
|
<?import javafx.scene.layout.ColumnConstraints?>
|
||||||
<?import javafx.scene.layout.GridPane?>
|
<?import javafx.scene.layout.GridPane?>
|
||||||
<?import javafx.scene.layout.RowConstraints?>
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
<JFXDialogLayout maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
|
||||||
<JFXDialogLayout maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.dialogs.ServerCreationController">
|
minWidth="-Infinity" prefHeight="600.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/8"
|
||||||
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
|
fx:controller="seng302.visualiser.controllers.dialogs.ServerCreationController">
|
||||||
<children>
|
<children>
|
||||||
<GridPane>
|
<GridPane>
|
||||||
<children>
|
<children>
|
||||||
@@ -36,9 +38,14 @@
|
|||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="-Infinity" minHeight="90.0" prefHeight="90.0"
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
vgrow="SOMETIMES"/>
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="-Infinity" minHeight="90.0" prefHeight="90.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="-Infinity" minHeight="90.0" prefHeight="90.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="-Infinity" minHeight="90.0" prefHeight="90.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<JFXTextField fx:id="serverName" promptText="SERVER NAME">
|
<JFXTextField fx:id="serverName" promptText="SERVER NAME">
|
||||||
@@ -46,29 +53,33 @@
|
|||||||
<Insets left="15.0" right="15.0" />
|
<Insets left="15.0" right="15.0" />
|
||||||
</padding>
|
</padding>
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="35.0" right="35.0" />
|
<Insets left="20.0" right="35.0"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</JFXTextField>
|
</JFXTextField>
|
||||||
<GridPane fx:id="maxPlayersGridPane" GridPane.rowIndex="1">
|
<GridPane fx:id="maxPlayersGridPane" GridPane.rowIndex="1">
|
||||||
<children>
|
<children>
|
||||||
<Label fx:id="maxPlayersLabel" text="20" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="TOP">
|
<Label styleClass="optionLabel" text="MAX PLAYERS" translateY="5.0"
|
||||||
|
GridPane.halignment="CENTER" GridPane.valignment="BOTTOM">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets right="30.0" />
|
<Insets/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</Label>
|
</Label>
|
||||||
<Label fx:id="maxPlayerPromptLabel" text="MAX PLAYERS" GridPane.halignment="LEFT" GridPane.valignment="BOTTOM">
|
<JFXSlider fx:id="maxPlayersSlider" blockIncrement="1.0"
|
||||||
|
majorTickUnit="2.0" max="20.0" min="1.0" minorTickCount="1"
|
||||||
|
snapToTicks="true" styleClass="maxPlayers" value="11.0"
|
||||||
|
GridPane.columnIndex="1" GridPane.valignment="BOTTOM">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="30.0" top="20.0" />
|
<Insets right="30.0"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</Label>
|
</JFXSlider>
|
||||||
<VBox alignment="BOTTOM_CENTER" prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
<Label fx:id="maxPlayersLabel" alignment="CENTER"
|
||||||
<children>
|
styleClass="sliderLabel" text="10" GridPane.columnIndex="1"
|
||||||
<JFXSlider fx:id="maxPlayersSlider" blockIncrement="1.0" majorTickUnit="2.0" max="20.0" min="1.0" minorTickCount="1" snapToTicks="true" styleClass="maxPlayers" value="11.0" />
|
GridPane.halignment="CENTER" GridPane.rowIndex="1"
|
||||||
</children>
|
GridPane.valignment="CENTER">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets bottom="10.0" right="30.0" />
|
<Insets right="15.0"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</VBox>
|
</Label>
|
||||||
</children>
|
</children>
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="30.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="30.0" prefWidth="100.0" />
|
||||||
@@ -81,48 +92,68 @@
|
|||||||
</GridPane>
|
</GridPane>
|
||||||
<GridPane fx:id="maxPlayersGridPane1" GridPane.rowIndex="2">
|
<GridPane fx:id="maxPlayersGridPane1" GridPane.rowIndex="2">
|
||||||
<children>
|
<children>
|
||||||
<Label fx:id="legsSliderLabel" text="20" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="TOP">
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets right="30.0" />
|
|
||||||
</GridPane.margin>
|
|
||||||
</Label>
|
|
||||||
<VBox alignment="BOTTOM_CENTER" prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
|
||||||
<children>
|
|
||||||
<JFXSlider fx:id="legsSlider" blockIncrement="1.0" majorTickUnit="2.0" max="20.0" min="1.0" minorTickCount="1" snapToTicks="true" styleClass="maxPlayers" value="11.0" />
|
|
||||||
</children>
|
|
||||||
<GridPane.margin>
|
|
||||||
<Insets bottom="10.0" right="30.0" />
|
|
||||||
</GridPane.margin>
|
|
||||||
</VBox>
|
|
||||||
<GridPane>
|
<GridPane>
|
||||||
<children>
|
<children>
|
||||||
<Label alignment="CENTER" text="NUMBER OF" GridPane.halignment="CENTER" />
|
<Label alignment="CENTER" styleClass="optionLabel"
|
||||||
<Label alignment="CENTER" text="REPEATING LEGS" GridPane.halignment="CENTER" GridPane.rowIndex="1" />
|
text="NUMBER OF" GridPane.halignment="CENTER"
|
||||||
|
GridPane.valignment="BOTTOM"/>
|
||||||
</children>
|
</children>
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
|
||||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
<JFXCheckBox fx:id="pickupsCheckBox" text="Enable Pickups" GridPane.rowIndex="1">
|
<JFXSlider fx:id="legsSlider" blockIncrement="1.0"
|
||||||
|
majorTickUnit="2.0" max="20.0" min="1.0" minorTickCount="1"
|
||||||
|
snapToTicks="true" styleClass="maxPlayers" value="11.0"
|
||||||
|
GridPane.columnIndex="1" GridPane.halignment="CENTER"
|
||||||
|
GridPane.valignment="BOTTOM">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="5.0" />
|
<Insets right="30.0"/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</JFXCheckBox>
|
</JFXSlider>
|
||||||
|
<Label alignment="CENTER" styleClass="optionLabel"
|
||||||
|
text="REPEATING LEGS" GridPane.halignment="CENTER"
|
||||||
|
GridPane.rowIndex="1"/>
|
||||||
|
<Label fx:id="legsSliderLabel" styleClass="sliderLabel" text="10"
|
||||||
|
GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets right="15.0"/>
|
||||||
|
</GridPane.margin>
|
||||||
|
</Label>
|
||||||
</children>
|
</children>
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="30.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" percentWidth="30.0" prefWidth="100.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="100.0" prefWidth="100.0" />
|
<ColumnConstraints halignment="CENTER" hgrow="SOMETIMES"
|
||||||
|
minWidth="100.0" prefWidth="100.0"/>
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" percentHeight="60.0" prefHeight="10.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="-Infinity" minHeight="10.0"
|
||||||
<RowConstraints minHeight="10.0" percentHeight="40.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
percentHeight="60.0" prefHeight="100.0" vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="-Infinity" minHeight="10.0"
|
||||||
|
percentHeight="40.0" prefHeight="100.0" vgrow="SOMETIMES"/>
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
<GridPane GridPane.rowIndex="3">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||||
|
percentWidth="30.0" prefWidth="100.0"/>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||||
|
prefWidth="100.0"/>
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints minHeight="10.0" prefHeight="30.0"
|
||||||
|
vgrow="SOMETIMES"/>
|
||||||
|
</rowConstraints>
|
||||||
|
<children>
|
||||||
|
<JFXCheckBox fx:id="pickupsCheckBox" text=" "
|
||||||
|
GridPane.columnIndex="1"/>
|
||||||
|
<Label styleClass="optionLabel" text="ENABLE TOKENS"
|
||||||
|
GridPane.halignment="CENTER" GridPane.valignment="CENTER"/>
|
||||||
|
</children>
|
||||||
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
<GridPane GridPane.columnIndex="1">
|
<GridPane GridPane.columnIndex="1">
|
||||||
@@ -152,7 +183,8 @@
|
|||||||
<RowConstraints maxHeight="342.0" minHeight="10.0" prefHeight="336.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="342.0" minHeight="10.0" prefHeight="336.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<Label fx:id="mapNameLabel" text="MAP NAME" GridPane.halignment="CENTER" />
|
<Label fx:id="mapNameLabel" styleClass="optionLabel" text="MAP NAME"
|
||||||
|
GridPane.halignment="CENTER"/>
|
||||||
<AnchorPane fx:id="mapHolder" prefHeight="333.0" prefWidth="404.0" GridPane.rowIndex="1" />
|
<AnchorPane fx:id="mapHolder" prefHeight="333.0" prefWidth="404.0" GridPane.rowIndex="1" />
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
@@ -164,6 +196,8 @@
|
|||||||
<font>
|
<font>
|
||||||
<Font size="20.0" />
|
<Font size="20.0" />
|
||||||
</font></Label>
|
</font></Label>
|
||||||
|
<Label fx:id="closeLabel" text="✖" translateY="-10.0" GridPane.halignment="RIGHT"
|
||||||
|
GridPane.valignment="TOP"/>
|
||||||
</children>
|
</children>
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
@@ -175,4 +209,8 @@
|
|||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
|
<stylesheets>
|
||||||
|
<URL value="@../../css/Master.css"/>
|
||||||
|
<URL value="@../../css/dialogs/ServerCreation.css"/>
|
||||||
|
</stylesheets>
|
||||||
</JFXDialogLayout>
|
</JFXDialogLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user