Various bug fixes

- Made canvas fill entire screen
- Made window scale to screens that aren't 1920x1080
- Changed boat speeds in mock so they aren't too fast
- Added command line options to switch server

Tags: #story[829]
This commit is contained in:
Michael Rausch
2017-05-03 21:56:51 +12:00
parent f0d6312fa5
commit d992422efd
11 changed files with 78 additions and 36 deletions
+19 -6
View File
@@ -16,27 +16,40 @@ public class App extends Application
Parent root = FXMLLoader.load(getClass().getResource("/views/MainView.fxml"));
primaryStage.setTitle("RaceVision");
primaryStage.setScene(new Scene(root));
primaryStage.setMaximized(true);
primaryStage.show();
}
public static void main(String[] args) {
StreamReceiver sr;
StreamReceiver sr = null;
new ServerThread("Racevision Test Server");
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
e.printStackTrace();
}
if (args.length > 1){
sr = new StreamReceiver("localhost", 8085, "RaceStream");
if (args.length == 3 && args[0].equals("-server")){
sr = new StreamReceiver(args[1], Integer.valueOf(args[2]), "RaceStream");
}
else if(args.length == 2 && args[0].equals("-server")){
switch (args[1]) {
case "internal":
sr = new StreamReceiver("localhost", 8085, "RaceStream");
break;
case "staffserver":
sr = new StreamReceiver("csse-s302staff.canterbury.ac.nz", 4941, "RaceStream");
break;
case "official":
sr = new StreamReceiver("livedata.americascup.com", 4941, "RaceStream");
break;
}
}
else{
// sr = new StreamReceiver("csse-s302staff.canterbury.ac.nz", 4941,"RaceStream");
sr = new StreamReceiver("livedata.americascup.com", 4941, "RaceStream");
// sr = new StreamReceiver("localhost", 8085, "RaceStream");
sr = new StreamReceiver("localhost", 8085, "RaceStream");
}
sr.start();