mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Fixed discovery bug, implemented server list, added server parameters
- Resolved DNS bug by updating to a newer version of JmDNS - Added server list, this is populated with new servers as they are discovered - Added map name and spaces remaining to server advertisement Tags: #story[1247]
This commit is contained in:
@@ -74,7 +74,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>javax.jmdns</groupId>
|
<groupId>javax.jmdns</groupId>
|
||||||
<artifactId>jmdns</artifactId>
|
<artifactId>jmdns</artifactId>
|
||||||
<version>3.4.1</version>
|
<version>3.4.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@@ -159,4 +159,12 @@
|
|||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</reporting>
|
</reporting>
|
||||||
|
|
||||||
|
<repositories>
|
||||||
|
<repository>
|
||||||
|
<id>Homer-Core</id>
|
||||||
|
<name>Homer-core-repo</name>
|
||||||
|
<url>https://nexus.arcsmed.at/content/repositories/homer.core</url>
|
||||||
|
</repository>
|
||||||
|
</repositories>
|
||||||
</project>
|
</project>
|
||||||
@@ -14,13 +14,17 @@ import org.apache.commons.cli.Options;
|
|||||||
import org.apache.commons.cli.ParseException;
|
import org.apache.commons.cli.ParseException;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import seng302.gameServer.ServerAdvertiser;
|
||||||
import seng302.model.PolarTable;
|
import seng302.model.PolarTable;
|
||||||
|
import seng302.visualiser.ServerListener;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
public class App extends Application {
|
public class App extends Application {
|
||||||
|
|
||||||
private static Logger logger = LoggerFactory.getLogger(App.class);
|
private static Logger logger = LoggerFactory.getLogger(App.class);
|
||||||
|
|
||||||
public static void parseArgs(String[] args) throws ParseException {
|
public static void parseArgs(String[] args) throws ParseException, IOException {
|
||||||
Options options = new Options();
|
Options options = new Options();
|
||||||
CommandLineParser parser = new DefaultParser();
|
CommandLineParser parser = new DefaultParser();
|
||||||
CommandLine cmd;
|
CommandLine cmd;
|
||||||
@@ -82,6 +86,7 @@ public class App extends Application {
|
|||||||
primaryStage.setOnCloseRequest(e -> {
|
primaryStage.setOnCloseRequest(e -> {
|
||||||
// ClientPacketParser.appClose();
|
// ClientPacketParser.appClose();
|
||||||
// ClientPacketParser.appClose();
|
// ClientPacketParser.appClose();
|
||||||
|
|
||||||
System.exit(0);
|
System.exit(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -93,6 +98,8 @@ public class App extends Application {
|
|||||||
parseArgs(args);
|
parseArgs(args);
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
logger.error("Could not parse command line arguments");
|
logger.error("Could not parse command line arguments");
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
launch(args);
|
launch(args);
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package seng302.gameServer;
|
package seng302.gameServer;
|
||||||
|
|
||||||
|
import javafx.application.Platform;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
import seng302.gameServer.messages.*;
|
import seng302.gameServer.messages.*;
|
||||||
import seng302.model.GeoPoint;
|
import seng302.model.GeoPoint;
|
||||||
import seng302.model.Player;
|
import seng302.model.Player;
|
||||||
@@ -37,6 +40,7 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
|
|||||||
|
|
||||||
private ServerSocket serverSocket = null;
|
private ServerSocket serverSocket = null;
|
||||||
private ArrayList<ServerToClientThread> serverToClientThreads = new ArrayList<>();
|
private ArrayList<ServerToClientThread> serverToClientThreads = new ArrayList<>();
|
||||||
|
private Logger logger = LoggerFactory.getLogger(MainServerThread.class);
|
||||||
|
|
||||||
public MainServerThread() {
|
public MainServerThread() {
|
||||||
new GameState("localhost");
|
new GameState("localhost");
|
||||||
@@ -45,6 +49,15 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
serverLog("IO error in server thread handler upon trying to make new server socket", 0);
|
serverLog("IO error in server thread handler upon trying to make new server socket", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Start advertising server
|
||||||
|
try{
|
||||||
|
ServerAdvertiser.getInstance().registerGame(PORT, "PP Test Server", 10, "Random Map");
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.warn("Could not register server");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PolarTable.parsePolarFile(getClass().getResourceAsStream("/config/acc_polars.csv"));
|
PolarTable.parsePolarFile(getClass().getResourceAsStream("/config/acc_polars.csv"));
|
||||||
GameState.addMarkPassListener(this::broadcastMessage);
|
GameState.addMarkPassListener(this::broadcastMessage);
|
||||||
terminated = false;
|
terminated = false;
|
||||||
@@ -206,6 +219,12 @@ public class MainServerThread implements Runnable, ClientConnectionDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void startGame() {
|
public void startGame() {
|
||||||
|
try {
|
||||||
|
ServerAdvertiser.getInstance().unregister();
|
||||||
|
} catch (IOException e) {
|
||||||
|
logger.warn("Error unregistering server");
|
||||||
|
}
|
||||||
|
|
||||||
initialiseBoatPositions();
|
initialiseBoatPositions();
|
||||||
Timer t = new Timer();
|
Timer t = new Timer();
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ import javax.jmdns.JmDNS;
|
|||||||
import javax.jmdns.ServiceInfo;
|
import javax.jmdns.ServiceInfo;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
import java.util.Hashtable;
|
||||||
|
|
||||||
public class ServerAdvertiser {
|
public class ServerAdvertiser {
|
||||||
private static String SERVICE = "_partyatsea_";
|
private static String SERVICE = "_partyatsea";
|
||||||
private static String PROTOCOL = "_tcp";
|
private static String PROTOCOL = "_tcp";
|
||||||
public static String SERVICE_TYPE = SERVICE + "." + PROTOCOL + ".local";
|
public static String SERVICE_TYPE = SERVICE + "." + PROTOCOL + ".local.";
|
||||||
private static Integer PROTO_VERSION = 1;
|
private static Integer PROTO_VERSION = 1;
|
||||||
|
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ public class ServerAdvertiser {
|
|||||||
private static JmDNS jmdnsInstance = null;
|
private static JmDNS jmdnsInstance = null;
|
||||||
|
|
||||||
private ServerAdvertiser() throws IOException{
|
private ServerAdvertiser() throws IOException{
|
||||||
jmdnsInstance = JmDNS.create(InetAddress.getLocalHost(), InetAddress.getByName(InetAddress.getLocalHost().getHostName()).toString());
|
jmdnsInstance = JmDNS.create(InetAddress.getLocalHost());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ServerAdvertiser getInstance() throws IOException {
|
public static ServerAdvertiser getInstance() throws IOException {
|
||||||
@@ -27,14 +28,30 @@ public class ServerAdvertiser {
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerGame(Integer portNo, String serverName, Integer spacesLeft, String mapName) throws IOException {
|
public void registerGame(Integer portNo, String serverName, Integer spacesLeft, String mapName) {
|
||||||
String serviceData = packageServerData(spacesLeft, mapName, PROTO_VERSION);
|
Hashtable<String ,String> props = new Hashtable<>();
|
||||||
ServiceInfo serviceInfo = ServiceInfo.create(SERVICE_TYPE, serverName, portNo, serviceData);
|
|
||||||
|
|
||||||
jmdnsInstance.registerService(serviceInfo);
|
props.put("map", mapName);
|
||||||
|
props.put("spacesLeft", spacesLeft.toString());
|
||||||
|
|
||||||
|
ServiceInfo serviceInfo = ServiceInfo.create(SERVICE_TYPE, serverName, portNo, 0, 0, props);
|
||||||
|
|
||||||
|
new java.util.Timer().schedule(
|
||||||
|
new java.util.TimerTask() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
jmdnsInstance.registerService(serviceInfo);
|
||||||
|
} catch (IOException e) {
|
||||||
|
System.out.println("Failed");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, 0
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String packageServerData(Integer spacesLeft, String mapName, Integer version){
|
public void unregister(){
|
||||||
return spacesLeft.toString() + "|" + mapName + "|" + version.toString();
|
jmdnsInstance.unregisterAllServices();
|
||||||
|
jmdnsInstance = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package seng302.gameServer;
|
||||||
|
|
||||||
|
public class ServerDescription {
|
||||||
|
private String address;
|
||||||
|
private Integer portNum;
|
||||||
|
|
||||||
|
private String serverName;
|
||||||
|
private String mapName;
|
||||||
|
private Integer spacesLeft;
|
||||||
|
|
||||||
|
public ServerDescription(String serverName, String mapName, Integer spacesLeft, String address, Integer portNum){
|
||||||
|
this.serverName = serverName;
|
||||||
|
this.mapName = mapName;
|
||||||
|
this.spacesLeft = spacesLeft;
|
||||||
|
this.address = address;
|
||||||
|
this.portNum = portNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return serverName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMapName() {
|
||||||
|
return mapName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer portNumber() {
|
||||||
|
return portNum;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddress(){
|
||||||
|
return address;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer spacesLeft() {
|
||||||
|
return spacesLeft;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -142,6 +142,7 @@ public class GameClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void loadStartScreen() {
|
private void loadStartScreen() {
|
||||||
|
|
||||||
socketThread.setSocketToClose();
|
socketThread.setSocketToClose();
|
||||||
if (server != null) {
|
if (server != null) {
|
||||||
server.terminate();
|
server.terminate();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package seng302.visualiser;
|
package seng302.visualiser;
|
||||||
|
|
||||||
import seng302.gameServer.ServerAdvertiser;
|
import seng302.gameServer.ServerAdvertiser;
|
||||||
|
import seng302.gameServer.ServerDescription;
|
||||||
|
|
||||||
import javax.jmdns.JmDNS;
|
import javax.jmdns.JmDNS;
|
||||||
import javax.jmdns.ServiceEvent;
|
import javax.jmdns.ServiceEvent;
|
||||||
@@ -8,36 +9,67 @@ import javax.jmdns.ServiceListener;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.UnknownHostException;
|
import java.net.UnknownHostException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class ServerListener{
|
public class ServerListener{
|
||||||
private static ServerListener instance;
|
private static ServerListener instance;
|
||||||
private ServerListenerDelegate delegate;
|
private ServerListenerDelegate delegate;
|
||||||
private JmDNS jmdns = null;
|
private JmDNS jmdns = null;
|
||||||
|
GameServeMonitor listener;
|
||||||
|
|
||||||
private class GameServerListener implements ServiceListener {
|
private class GameServeMonitor implements ServiceListener {
|
||||||
GameServerListener(){
|
private List<ServerDescription> servers;
|
||||||
System.out.println("Created GSL instance");
|
|
||||||
|
GameServeMonitor(){
|
||||||
|
servers = new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serviceAdded(ServiceEvent event) {
|
public void serviceAdded(ServiceEvent event) {
|
||||||
delegate.serverDetected(event.getName(), "", 123, event.getInfo().getInet4Addresses().toString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serviceRemoved(ServiceEvent event) {
|
public void serviceRemoved(ServiceEvent event) {
|
||||||
delegate.serverRemoved(event.getName());
|
Integer serverId = -1;
|
||||||
|
|
||||||
|
for (int i = 0; i < servers.size(); i++){
|
||||||
|
ServerDescription server = servers.get(i);
|
||||||
|
if (server.getName().equals(event.getInfo().getName())){
|
||||||
|
serverId = i;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (serverId > 0){
|
||||||
|
servers.remove(serverId);
|
||||||
|
}
|
||||||
|
|
||||||
|
delegate.serverRemoved(servers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void serviceResolved(ServiceEvent event) {
|
public void serviceResolved(ServiceEvent event) {
|
||||||
// Do nothing
|
String address = event.getInfo().getServer();
|
||||||
|
Integer portNum = event.getInfo().getPort();
|
||||||
|
|
||||||
|
String serverName = event.getInfo().getName();
|
||||||
|
String mapName = event.getInfo().getPropertyString("map");
|
||||||
|
Integer spacesLeft = Integer.parseInt(event.getInfo().getPropertyString("spacesLeft"));
|
||||||
|
|
||||||
|
ServerDescription serverDescription = new ServerDescription(serverName, mapName, spacesLeft, address, portNum);
|
||||||
|
servers.add(serverDescription);
|
||||||
|
|
||||||
|
delegate.serverDetected(serverDescription, Collections.unmodifiableList(servers));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ServerListener() throws IOException {
|
private ServerListener() throws IOException {
|
||||||
jmdns = JmDNS.create(InetAddress.getLocalHost());
|
jmdns = JmDNS.create(InetAddress.getLocalHost());
|
||||||
jmdns.addServiceListener(ServerAdvertiser.SERVICE_TYPE, new GameServerListener());
|
listener = new GameServeMonitor();
|
||||||
|
jmdns.addServiceListener(ServerAdvertiser.SERVICE_TYPE, listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ServerListener getInstance() throws IOException {
|
public static ServerListener getInstance() throws IOException {
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
package seng302.visualiser;
|
package seng302.visualiser;
|
||||||
|
|
||||||
|
import seng302.gameServer.ServerDescription;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public interface ServerListenerDelegate {
|
public interface ServerListenerDelegate {
|
||||||
void serverDetected(String serverName, String mapName, Integer placesLeft, String serverAddress);
|
void serverRemoved(List<ServerDescription> currentServers);
|
||||||
void serverRemoved(String serverName);
|
void serverDetected(ServerDescription serverDescription, List<ServerDescription> servers);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,33 @@
|
|||||||
package seng302.visualiser.controllers;
|
package seng302.visualiser.controllers;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
import java.net.NetworkInterface;
|
import java.net.NetworkInterface;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.Enumeration;
|
import java.util.*;
|
||||||
import java.util.ResourceBundle;
|
|
||||||
|
import com.sun.security.ntlm.Server;
|
||||||
|
import cucumber.api.java.en.But;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.scene.control.Alert;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.ListView;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import seng302.gameServer.GameState;
|
import seng302.gameServer.GameState;
|
||||||
|
import seng302.gameServer.ServerDescription;
|
||||||
import seng302.visualiser.GameClient;
|
import seng302.visualiser.GameClient;
|
||||||
|
import seng302.visualiser.ServerListener;
|
||||||
|
import seng302.visualiser.ServerListenerDelegate;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Class describing the actions of the start screen controller
|
* A Class describing the actions of the start screen controller
|
||||||
* Created by wmu16 on 10/07/17.
|
* Created by wmu16 on 10/07/17.
|
||||||
*/
|
*/
|
||||||
public class StartScreenController implements Initializable {
|
public class StartScreenController implements Initializable, ServerListenerDelegate{
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private TextField ipTextField;
|
private TextField ipTextField;
|
||||||
@@ -29,10 +38,27 @@ public class StartScreenController implements Initializable {
|
|||||||
@FXML
|
@FXML
|
||||||
private AnchorPane holder;
|
private AnchorPane holder;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Button joinLobbyButton;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private ListView serverList;
|
||||||
|
|
||||||
|
private List<ServerDescription> servers = null;
|
||||||
|
private boolean serverListDirty = false;
|
||||||
|
|
||||||
GameClient gameClient;
|
GameClient gameClient;
|
||||||
|
|
||||||
public void initialize(URL url, ResourceBundle resourceBundle) {
|
public void initialize(URL url, ResourceBundle resourceBundle) {
|
||||||
// gameClient = new GameClient(holder);
|
// gameClient = new GameClient(holder);
|
||||||
|
|
||||||
|
try {
|
||||||
|
ServerListener.getInstance().setDelegate(this);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
joinLobbyButton.setOnAction(event -> joinLobbyClicked());
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// /**
|
// /**
|
||||||
@@ -165,4 +191,41 @@ public class StartScreenController implements Initializable {
|
|||||||
// ClientState.setHostIp(ipAddress);
|
// ClientState.setHostIp(ipAddress);
|
||||||
return ipAddress;
|
return ipAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void refreshServerList(List<ServerDescription> servers){
|
||||||
|
this.serverList.getItems().clear();
|
||||||
|
|
||||||
|
for (ServerDescription server : servers){
|
||||||
|
serverList.getItems().add(server.getName() + " - " + server.getMapName() + " - " + server.spacesLeft() + " spaces left");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serverRemoved(List<ServerDescription> currentServers) {
|
||||||
|
this.servers = currentServers;
|
||||||
|
|
||||||
|
refreshServerList(currentServers);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serverDetected(ServerDescription serverDescription, List<ServerDescription> servers) {
|
||||||
|
this.servers = servers;
|
||||||
|
|
||||||
|
refreshServerList(servers);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void joinLobbyClicked() {
|
||||||
|
Integer selectedServer = serverList.getSelectionModel().getSelectedIndex();
|
||||||
|
|
||||||
|
if (this.servers == null || selectedServer >= this.servers.size()){
|
||||||
|
Alert alert = new Alert(Alert.AlertType.ERROR, "Invalid server selected");
|
||||||
|
alert.showAndWait();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ServerDescription server = servers.get(selectedServer);
|
||||||
|
|
||||||
|
gameClient = new GameClient(holder);
|
||||||
|
gameClient.runAsClient(server.getAddress().trim().toLowerCase(), server.portNumber());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import java.lang.*?>
|
|
||||||
<?import javafx.geometry.*?>
|
|
||||||
<?import javafx.scene.control.*?>
|
|
||||||
<?import javafx.scene.layout.*?>
|
|
||||||
<?import javafx.scene.text.*?>
|
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
|
<?import javafx.scene.control.ListView?>
|
||||||
<?import javafx.scene.control.TextField?>
|
<?import javafx.scene.control.TextField?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.layout.ColumnConstraints?>
|
<?import javafx.scene.layout.ColumnConstraints?>
|
||||||
@@ -16,17 +12,17 @@
|
|||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
<AnchorPane fx:id="holder" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="960.0" prefWidth="1530.0" style="-fx-background-color: #2C2c36;" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.StartScreenController">
|
<AnchorPane fx:id="holder" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="960.0" prefWidth="1530.0" style="-fx-background-color: #2C2c36;" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.StartScreenController">
|
||||||
<children>
|
<children>
|
||||||
<GridPane fx:id="startScreen2" layoutX="365.0" layoutY="285.0" nodeOrientation="LEFT_TO_RIGHT" prefWidth="800.0" style="-fx-background-color: #2C2c36;">
|
<GridPane fx:id="startScreen2" layoutX="356.0" layoutY="285.0" nodeOrientation="LEFT_TO_RIGHT" prefHeight="198.0" prefWidth="809.0" style="-fx-background-color: #2C2c36;">
|
||||||
<children>
|
<children>
|
||||||
<Label alignment="CENTER" text="Welcome to Race Vision" textFill="WHITE" GridPane.columnSpan="2147483647" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="BOTTOM">
|
<Label alignment="CENTER" text="Welcome to Party Parrots At Sea" textFill="WHITE" GridPane.columnSpan="2147483647" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="BOTTOM">
|
||||||
<font>
|
<font>
|
||||||
<Font size="40.0" />
|
<Font size="40.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Button mnemonicParsing="false" onAction="#hostButtonPressed" prefHeight="25.0" prefWidth="175.0" text="Host" GridPane.columnSpan="2147483647" GridPane.halignment="CENTER" GridPane.rowIndex="2" />
|
<Button mnemonicParsing="false" onAction="#hostButtonPressed" prefHeight="25.0" prefWidth="175.0" text="Host" GridPane.columnSpan="2147483647" GridPane.halignment="CENTER" GridPane.rowIndex="2" />
|
||||||
<Button mnemonicParsing="false" onAction="#connectButtonPressed" prefHeight="25.0" prefWidth="147.0" text="Connect" GridPane.columnIndex="1" GridPane.rowIndex="4">
|
<Button mnemonicParsing="false" onAction="#connectButtonPressed" prefHeight="25.0" prefWidth="147.0" text="Direct Connect" GridPane.columnIndex="1" GridPane.rowIndex="4">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="5.0" right="5.0" />
|
<Insets left="5.0" right="5.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
@@ -60,10 +56,9 @@
|
|||||||
<RowConstraints maxHeight="42.0" minHeight="10.0" prefHeight="42.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="42.0" minHeight="10.0" prefHeight="42.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="26.0" minHeight="13.0" prefHeight="26.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="26.0" minHeight="13.0" prefHeight="26.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="66.0" minHeight="59.0" prefHeight="59.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="66.0" minHeight="59.0" prefHeight="59.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="65.0" minHeight="36.0" prefHeight="46.0" vgrow="SOMETIMES" />
|
|
||||||
<RowConstraints maxHeight="108.0" minHeight="72.0" prefHeight="98.0" vgrow="SOMETIMES" />
|
|
||||||
<RowConstraints minHeight="72.0" prefHeight="72.0" vgrow="SOMETIMES" />
|
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
|
<ListView fx:id="serverList" layoutX="571.0" layoutY="496.0" prefHeight="146.0" prefWidth="386.0" />
|
||||||
|
<Button fx:id="joinLobbyButton" layoutX="571.0" layoutY="652.0" mnemonicParsing="false" text="Join Lobby" />
|
||||||
</children>
|
</children>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
|||||||
Reference in New Issue
Block a user