Stylin'
#story[1301]
This commit is contained in:
@@ -77,7 +77,7 @@ public class Event {
|
|||||||
String boatsXMLFile = "mock/mockXML/boatTest.xml";
|
String boatsXMLFile = "mock/mockXML/boatTest.xml";
|
||||||
String regattaXMLFile = "mock/mockXML/regattaTest.xml";
|
String regattaXMLFile = "mock/mockXML/regattaTest.xml";
|
||||||
switch (mapIndex){
|
switch (mapIndex){
|
||||||
case 0:raceXMLFile = "mock/mockXML/raceSixPlayers.xml";
|
case 0:raceXMLFile = "mock/mockXML/ac35MapLayout.xml";
|
||||||
break;
|
break;
|
||||||
case 1:raceXMLFile = "mock/mockXML/oMapLayout.xml";
|
case 1:raceXMLFile = "mock/mockXML/oMapLayout.xml";
|
||||||
break;
|
break;
|
||||||
@@ -90,13 +90,12 @@ public class Event {
|
|||||||
boatsXMLFile = "mock/mockXML/boatTutorial.xml";
|
boatsXMLFile = "mock/mockXML/boatTutorial.xml";
|
||||||
regattaXMLFile = "mock/mockXML/regattaTutorial.xml";
|
regattaXMLFile = "mock/mockXML/regattaTutorial.xml";
|
||||||
break;
|
break;
|
||||||
default: raceXMLFile = "mock/mockXML/raceSixPlayers.xml";
|
default: raceXMLFile = "mock/mockXML/ac35MapLayout.xml";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (singlePlayer) {
|
if (singlePlayer) {
|
||||||
raceXMLFile = "mock/mockXML/raceSinglePlayer.xml";
|
|
||||||
boatsXMLFile = "mock/mockXML/boatsSinglePlayer.xml";
|
boatsXMLFile = "mock/mockXML/boatsSinglePlayer.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,8 +109,6 @@ public class MockRace extends RaceState {
|
|||||||
colliderRegistry.addCollider(mark.getMark1());
|
colliderRegistry.addCollider(mark.getMark1());
|
||||||
if(mark.getMark2() != null) colliderRegistry.addCollider(mark.getMark2());
|
if(mark.getMark2() != null) colliderRegistry.addCollider(mark.getMark2());
|
||||||
}
|
}
|
||||||
|
|
||||||
this.colliderRegistry.addAllColliders(boats);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -133,9 +131,9 @@ public class MockRace extends RaceState {
|
|||||||
|
|
||||||
this.boats.add(mockBoat);
|
this.boats.add(mockBoat);
|
||||||
this.activeObserverCommands.put(boat.getSourceID(), new ActiveObserverCommand());
|
this.activeObserverCommands.put(boat.getSourceID(), new ActiveObserverCommand());
|
||||||
|
this.colliderRegistry.addCollider(mockBoat);
|
||||||
|
|
||||||
getRaceDataSource().incrementSequenceNumber();
|
getRaceDataSource().incrementSequenceNumber();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -418,7 +418,7 @@ public class Boat extends Collider {
|
|||||||
@Override
|
@Override
|
||||||
public boolean rayCast(Boat boat) {
|
public boolean rayCast(Boat boat) {
|
||||||
if(boat != this) {
|
if(boat != this) {
|
||||||
return rayCast(boat, 15);
|
return rayCast(boat, 50);
|
||||||
} else return false;
|
} else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class Constants {
|
|||||||
* Frame periods are multiplied by this to get the amount of time a single frame represents.
|
* Frame periods are multiplied by this to get the amount of time a single frame represents.
|
||||||
* E.g., frame period = 20ms, scale = 5, frame represents 20 * 5 = 100ms, and so boats are simulated for 100ms, even though only 20ms actually occurred.
|
* E.g., frame period = 20ms, scale = 5, frame represents 20 * 5 = 100ms, and so boats are simulated for 100ms, even though only 20ms actually occurred.
|
||||||
*/
|
*/
|
||||||
public static final int RaceTimeScale = 2;
|
public static final int RaceTimeScale = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The race pre-start time, in milliseconds. 30 seconds.
|
* The race pre-start time, in milliseconds. 30 seconds.
|
||||||
|
|||||||
@@ -17,8 +17,9 @@ public class MarkRoundingSequence {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* For each leg, mark rounding information.
|
* For each leg, mark rounding information.
|
||||||
|
* Maps between leg number and rounding data.
|
||||||
*/
|
*/
|
||||||
private Map<Leg, MarkRoundingData> roundingPoints;
|
private Map<Integer, MarkRoundingData> roundingPoints;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ public class MarkRoundingSequence {
|
|||||||
* @return Rounding points for leg.
|
* @return Rounding points for leg.
|
||||||
*/
|
*/
|
||||||
public MarkRoundingData getRoundingData(Leg leg) {
|
public MarkRoundingData getRoundingData(Leg leg) {
|
||||||
return roundingPoints.get(leg);
|
return roundingPoints.get(leg.getLegNumber());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -139,7 +140,7 @@ public class MarkRoundingSequence {
|
|||||||
roundingData.setRoundCheck2Halfway(roundCheck2Halfway);
|
roundingData.setRoundCheck2Halfway(roundCheck2Halfway);
|
||||||
|
|
||||||
|
|
||||||
this.roundingPoints.put(currentLeg, roundingData);
|
this.roundingPoints.put(currentLeg.getLegNumber(), roundingData);
|
||||||
|
|
||||||
|
|
||||||
//Rounding points:
|
//Rounding points:
|
||||||
|
|||||||
@@ -433,7 +433,7 @@ public class RaceViewController extends Controller {
|
|||||||
// Track player boat with camera
|
// Track player boat with camera
|
||||||
viewSubjects.add(boatModel);
|
viewSubjects.add(boatModel);
|
||||||
Platform.runLater(() -> {
|
Platform.runLater(() -> {
|
||||||
view3D.trackSubject(boatModel);
|
view3D.trackSubject(boatModel, 0);
|
||||||
view3D.setThirdPerson();
|
view3D.setThirdPerson();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -574,7 +574,12 @@ public class RaceViewController extends Controller {
|
|||||||
|
|
||||||
// Bind zooming to scrolling
|
// Bind zooming to scrolling
|
||||||
view3D.setOnScroll(e -> {
|
view3D.setOnScroll(e -> {
|
||||||
view3D.updateDistance(e.getDeltaY());
|
//view3D.updateDistance(e.getDeltaY());
|
||||||
|
if (e.getDeltaY() > 0) {
|
||||||
|
view3D.zoomIn();
|
||||||
|
} else {
|
||||||
|
view3D.zoomOut();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Bind zooming to keypress (Z/X default)
|
// Bind zooming to keypress (Z/X default)
|
||||||
|
|||||||
@@ -1,17 +1,33 @@
|
|||||||
package visualiser.Controllers;
|
package visualiser.Controllers;
|
||||||
|
|
||||||
|
import com.interactivemesh.jfx.importer.stl.StlMeshImporter;
|
||||||
|
import javafx.animation.AnimationTimer;
|
||||||
|
import javafx.application.Platform;
|
||||||
|
import javafx.collections.FXCollections;
|
||||||
|
import javafx.collections.ObservableList;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.AmbientLight;
|
||||||
|
import javafx.scene.PointLight;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
import javafx.scene.control.RadioButton;
|
import javafx.scene.control.RadioButton;
|
||||||
|
import javafx.scene.control.ToggleGroup;
|
||||||
import javafx.scene.image.Image;
|
import javafx.scene.image.Image;
|
||||||
import javafx.scene.image.ImageView;
|
import javafx.scene.image.ImageView;
|
||||||
|
import javafx.scene.layout.AnchorPane;
|
||||||
|
import javafx.scene.layout.GridPane;
|
||||||
import javafx.scene.layout.Pane;
|
import javafx.scene.layout.Pane;
|
||||||
import javafx.scene.media.AudioClip;
|
import javafx.scene.media.AudioClip;
|
||||||
import javafx.scene.media.Media;
|
import javafx.scene.media.Media;
|
||||||
import javafx.scene.media.MediaPlayer;
|
import javafx.scene.media.MediaPlayer;
|
||||||
|
import javafx.scene.paint.Color;
|
||||||
|
import javafx.scene.shape.MeshView;
|
||||||
import javafx.stage.Modality;
|
import javafx.stage.Modality;
|
||||||
import mock.exceptions.EventConstructionException;
|
import mock.exceptions.EventConstructionException;
|
||||||
import visualiser.app.App;
|
import visualiser.app.App;
|
||||||
|
import visualiser.layout.SeaSurface;
|
||||||
|
import visualiser.layout.SkyBox;
|
||||||
|
import visualiser.layout.Subject3D;
|
||||||
|
import visualiser.layout.View3D;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -28,11 +44,74 @@ import java.util.logging.Logger;
|
|||||||
* the game.
|
* the game.
|
||||||
*/
|
*/
|
||||||
public class TitleController extends Controller {
|
public class TitleController extends Controller {
|
||||||
|
private @FXML AnchorPane titleWrapper;
|
||||||
private @FXML RadioButton dayModeRD;
|
private @FXML RadioButton dayModeRD;
|
||||||
private @FXML RadioButton nightModeRD;
|
private @FXML RadioButton nightModeRD;
|
||||||
private @FXML Label tutorialLabel;
|
private @FXML Button tutorialButton;
|
||||||
private @FXML Pane menuPane;
|
|
||||||
private @FXML ImageView imgSun;
|
private @FXML ImageView imgSun;
|
||||||
|
private @FXML GridPane view3DContainer;
|
||||||
|
private ToggleGroup toggleGroup = new ToggleGroup();
|
||||||
|
|
||||||
|
public void initialize() {
|
||||||
|
dayModeRD.setToggleGroup(toggleGroup);
|
||||||
|
nightModeRD.setToggleGroup(toggleGroup);
|
||||||
|
|
||||||
|
AmbientLight ambientLight = new AmbientLight(Color.web("#CCCCFF"));
|
||||||
|
ambientLight.setTranslateX(250);
|
||||||
|
ambientLight.setTranslateZ(210);
|
||||||
|
ambientLight.setLightOn(true);
|
||||||
|
|
||||||
|
PointLight pointLight = new PointLight(Color.web("#AAAAFF"));
|
||||||
|
pointLight.setTranslateX(250);
|
||||||
|
pointLight.setTranslateZ(210);
|
||||||
|
pointLight.setLightOn(true);
|
||||||
|
|
||||||
|
ObservableList<Subject3D> subjects = FXCollections.observableArrayList();
|
||||||
|
View3D view3D = new View3D();
|
||||||
|
view3D.addAmbientLight(ambientLight);
|
||||||
|
view3D.addPointLight(pointLight);
|
||||||
|
view3D.setDistance(10);
|
||||||
|
view3D.setPitch(5);
|
||||||
|
view3D.setItems(subjects);
|
||||||
|
|
||||||
|
SkyBox skyBox = new SkyBox(750,200,250,0,250);
|
||||||
|
subjects.addAll(skyBox.getSkyBoxPlanes());
|
||||||
|
|
||||||
|
SeaSurface seaSurface = new SeaSurface(750, 200);
|
||||||
|
seaSurface.setX(250);
|
||||||
|
seaSurface.setZ(250);
|
||||||
|
subjects.add(seaSurface);
|
||||||
|
|
||||||
|
URL asset = RaceViewController.class.getClassLoader().getResource("assets/V1.2 Complete Boat.stl");
|
||||||
|
StlMeshImporter importer = new StlMeshImporter();
|
||||||
|
importer.read(asset);
|
||||||
|
Subject3D boat = new Subject3D(new MeshView(importer.getImport()), 0);
|
||||||
|
|
||||||
|
double radius = 100;
|
||||||
|
boat.setX(0);
|
||||||
|
boat.setZ(radius);
|
||||||
|
boat.setScale(0.1);
|
||||||
|
|
||||||
|
subjects.add(boat);
|
||||||
|
view3D.trackSubject(boat, -45);
|
||||||
|
|
||||||
|
view3DContainer.add(view3D, 0, 0);
|
||||||
|
|
||||||
|
AnimationTimer loop = new AnimationTimer() {
|
||||||
|
double angle = -90;
|
||||||
|
double offset = 0.05;
|
||||||
|
@Override
|
||||||
|
public void handle(long now) {
|
||||||
|
boat.setX(radius * Math.cos(angle * Math.PI/180));
|
||||||
|
boat.setZ(radius * Math.sin(angle * Math.PI/180));
|
||||||
|
boat.setHeading(-angle);
|
||||||
|
angle += offset;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
loop.start();
|
||||||
|
|
||||||
|
titleWrapper.getStylesheets().add("/css/dayMode.css");
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method called when the 'host a game' button is pressed.
|
* Method called when the 'host a game' button is pressed.
|
||||||
@@ -58,10 +137,7 @@ public class TitleController extends Controller {
|
|||||||
*/
|
*/
|
||||||
public void setDayMode(){
|
public void setDayMode(){
|
||||||
dayModeRD.getScene().getStylesheets().clear();
|
dayModeRD.getScene().getStylesheets().clear();
|
||||||
menuPane.getStylesheets().clear();
|
|
||||||
imgSun.setImage(new Image(getClass().getResource("/visualiser/images/sun.png").toExternalForm()));
|
|
||||||
dayModeRD.getScene().getStylesheets().add("/css/dayMode.css");
|
dayModeRD.getScene().getStylesheets().add("/css/dayMode.css");
|
||||||
menuPane.setStyle("-fx-background-color: #6be6ff;");
|
|
||||||
nightModeRD.setSelected(false);
|
nightModeRD.setSelected(false);
|
||||||
App.dayMode = true;
|
App.dayMode = true;
|
||||||
}
|
}
|
||||||
@@ -71,10 +147,7 @@ public class TitleController extends Controller {
|
|||||||
*/
|
*/
|
||||||
public void setNightMode(){
|
public void setNightMode(){
|
||||||
nightModeRD.getScene().getStylesheets().clear();
|
nightModeRD.getScene().getStylesheets().clear();
|
||||||
menuPane.getStylesheets().clear();
|
|
||||||
imgSun.setImage(new Image(getClass().getResource("/visualiser/images/sunsleep.png").toExternalForm()));
|
|
||||||
nightModeRD.getScene().getStylesheets().add("/css/nightMode.css");
|
nightModeRD.getScene().getStylesheets().add("/css/nightMode.css");
|
||||||
menuPane.setStyle("-fx-background-color: #1f2c60;");
|
|
||||||
dayModeRD.setSelected(false);
|
dayModeRD.setSelected(false);
|
||||||
App.dayMode = false;
|
App.dayMode = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -134,7 +134,6 @@ public class App extends Application {
|
|||||||
FXMLLoader loader = new FXMLLoader(getClass().getResource
|
FXMLLoader loader = new FXMLLoader(getClass().getResource
|
||||||
("/visualiser/scenes/title.fxml"));
|
("/visualiser/scenes/title.fxml"));
|
||||||
Parent root = loader.load();
|
Parent root = loader.load();
|
||||||
stage.setResizable(false);
|
|
||||||
Scene scene = new Scene(root);
|
Scene scene = new Scene(root);
|
||||||
stage.setTitle("The Boat Game - Burgers & Boats");
|
stage.setTitle("The Boat Game - Burgers & Boats");
|
||||||
stage.getIcons().add(new Image(getClass().getClassLoader().getResourceAsStream("images/SailIcon.png")));
|
stage.getIcons().add(new Image(getClass().getClassLoader().getResourceAsStream("images/SailIcon.png")));
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class View3D extends Pane {
|
|||||||
PickResult result = e.getPickResult();
|
PickResult result = e.getPickResult();
|
||||||
if(result != null && result.getIntersectedNode() != null && result.getIntersectedNode() instanceof Shape3D) {
|
if(result != null && result.getIntersectedNode() != null && result.getIntersectedNode() instanceof Shape3D) {
|
||||||
untrackSubject();
|
untrackSubject();
|
||||||
trackSubject(shapeMap.get(result.getIntersectedNode()));
|
trackSubject(shapeMap.get(result.getIntersectedNode()), 0);
|
||||||
setThirdPerson();
|
setThirdPerson();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -215,15 +215,16 @@ public class View3D extends Pane {
|
|||||||
/**
|
/**
|
||||||
* Set camera to follow the selected subject
|
* Set camera to follow the selected subject
|
||||||
* @param subject to track
|
* @param subject to track
|
||||||
|
* @param yaw to add to boat heading
|
||||||
*/
|
*/
|
||||||
public void trackSubject(Subject3D subject) {
|
public void trackSubject(Subject3D subject, double yaw) {
|
||||||
target.set(subject);
|
target.set(subject);
|
||||||
|
|
||||||
this.trackBoat = new AnimationTimer() {
|
this.trackBoat = new AnimationTimer() {
|
||||||
@Override
|
@Override
|
||||||
public void handle(long now) {
|
public void handle(long now) {
|
||||||
updatePivot(target.get().getPosition());
|
updatePivot(target.get().getPosition());
|
||||||
setYaw(target.get().getHeading().getAngle());
|
setYaw(target.get().getHeading().getAngle() + yaw);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
trackBoat.start();
|
trackBoat.start();
|
||||||
@@ -270,6 +271,8 @@ public class View3D extends Pane {
|
|||||||
if (target.get() == null){
|
if (target.get() == null){
|
||||||
if (newDistance > MAX_ZOOM_LIMIT) {
|
if (newDistance > MAX_ZOOM_LIMIT) {
|
||||||
setDistance(MAX_ZOOM_LIMIT);
|
setDistance(MAX_ZOOM_LIMIT);
|
||||||
|
} else if (newDistance <= ZOOM_IN_LIMIT) {
|
||||||
|
setDistance(ZOOM_IN_LIMIT);
|
||||||
} else {
|
} else {
|
||||||
setDistance(newDistance);
|
setDistance(newDistance);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -605,7 +605,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
|||||||
|
|
||||||
//Prepare to draw.
|
//Prepare to draw.
|
||||||
gc.setLineWidth(1);
|
gc.setLineWidth(1);
|
||||||
gc.setFill(Color.DEEPSKYBLUE);
|
gc.setFill(Color.web("#f1f1d4"));
|
||||||
|
|
||||||
|
|
||||||
//Calculate the screen coordinates of the boundary.
|
//Calculate the screen coordinates of the boundary.
|
||||||
|
|||||||
@@ -102,3 +102,236 @@
|
|||||||
-fx-border-color: #012256;
|
-fx-border-color: #012256;
|
||||||
-fx-border-width: 3;
|
-fx-border-width: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Title menu buttons */
|
||||||
|
#hostAGameBtn {
|
||||||
|
-fx-background-image: url("/visualiser/images/hostAGameBtn.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hostAGameBtn:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/hostAGameBtnPressed.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#btnJoin {
|
||||||
|
-fx-background-image: url("/visualiser/images/JoinAGameBtn.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#btnJoin:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/JoinAGameBtnPressed.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tutorialButton {
|
||||||
|
-fx-background-image: url("/visualiser/images/howToPlayBtn.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tutorialButton:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/howToPlayBtnPressed.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#controlsBtn {
|
||||||
|
-fx-background-image: url("/visualiser/images/controlsBtn.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#controlsBtn:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/controlsBtnPressed.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* host game lobby buttons */
|
||||||
|
|
||||||
|
#hostGameBtn {
|
||||||
|
-fx-background-image: url("/visualiser/images/startGameBtn.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#hostGameBtn:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/startGameBtnPressed.png");
|
||||||
|
-fx-background-size: 150px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mainMenuBtn {
|
||||||
|
-fx-background-image: url("/visualiser/images/mainMenuBtn.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#mainMenuBtn:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/mainMenuBtnPressed.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* match browsing lobby buttons */
|
||||||
|
|
||||||
|
#addBtn {
|
||||||
|
-fx-background-image: url("/visualiser/images/addBtn.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#addBtn:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/addBtnPressed.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#refreshBtn {
|
||||||
|
-fx-background-image: url("/visualiser/images/refreshBtn.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#refreshBtn:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/refreshBtnPressed.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#refreshBtn {
|
||||||
|
-fx-background-image: url("/visualiser/images/refreshBtn.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#joinGameBtn {
|
||||||
|
-fx-background-image: url("/visualiser/images/participateBtn.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#joinGameBtn:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/participateBtnPressed.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#spectateButton {
|
||||||
|
-fx-background-image: url("/visualiser/images/spectateBtn.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#spectateButton:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/spectateBtnPressed.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* in-game lobby buttons */
|
||||||
|
|
||||||
|
#quitBtn {
|
||||||
|
-fx-background-image: url("/visualiser/images/quitBtn.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#quitBtn:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/quitBtnPressed.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#startButton {
|
||||||
|
-fx-background-image: url("/visualiser/images/startBtn.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#startButton:pressed {
|
||||||
|
-fx-background-image: url("/visualiser/images/startBtnPressed.png");
|
||||||
|
-fx-background-size: 115px;
|
||||||
|
-fx-background-repeat: no-repeat;
|
||||||
|
-fx-background-position: center center;
|
||||||
|
-fx-focus-color: transparent;
|
||||||
|
-fx-background-color: transparent;
|
||||||
|
}
|
||||||
|
|||||||
+11
-11
@@ -37,16 +37,16 @@
|
|||||||
</CompoundMark>
|
</CompoundMark>
|
||||||
</Course>
|
</Course>
|
||||||
<CourseLimit>
|
<CourseLimit>
|
||||||
<Limit Lat="32.313922" Lon="-64.837168" SeqID="1"/>
|
<Limit Lat="32.311922" Lon="-64.841168" SeqID="1"/>
|
||||||
<Limit Lat="32.317379" Lon="-64.839291" SeqID="2"/>
|
<Limit Lat="32.319379" Lon="-64.841291" SeqID="2"/>
|
||||||
<Limit Lat="32.317911" Lon="-64.836996" SeqID="3"/>
|
<Limit Lat="32.319911" Lon="-64.836996" SeqID="3"/>
|
||||||
<Limit Lat="32.317257" Lon="-64.83626" SeqID="4"/>
|
<Limit Lat="32.319257" Lon="-64.83326" SeqID="4"/>
|
||||||
<Limit Lat="32.304273" Lon="-64.822834" SeqID="5"/>
|
<Limit Lat="32.305273" Lon="-64.821834" SeqID="5"/>
|
||||||
<Limit Lat="32.279097" Lon="-64.841545" SeqID="6"/>
|
<Limit Lat="32.276097" Lon="-64.839545" SeqID="6"/>
|
||||||
<Limit Lat="32.279604" Lon="-64.849871" SeqID="7"/>
|
<Limit Lat="32.275604" Lon="-64.851871" SeqID="7"/>
|
||||||
<Limit Lat="32.289545" Lon="-64.854162" SeqID="8"/>
|
<Limit Lat="32.286545" Lon="-64.856162" SeqID="8"/>
|
||||||
<Limit Lat="32.290198" Lon="-64.858711" SeqID="9"/>
|
<Limit Lat="32.288198" Lon="-64.860711" SeqID="9"/>
|
||||||
<Limit Lat="32.297164" Lon="-64.856394" SeqID="10"/>
|
<Limit Lat="32.299164" Lon="-64.857394" SeqID="10"/>
|
||||||
<Limit Lat="32.296148" Lon="-64.849184" SeqID="11"/>
|
<Limit Lat="32.299148" Lon="-64.851184" SeqID="11"/>
|
||||||
</CourseLimit>
|
</CourseLimit>
|
||||||
</Race>
|
</Race>
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<Race>
|
|
||||||
<RaceID>5326</RaceID>
|
|
||||||
<RaceType>FLEET</RaceType>
|
|
||||||
<CreationTimeDate>RACE_CREATION_TIME</CreationTimeDate>
|
|
||||||
<RaceStartTime Postpone="false" Time="RACE_START_TIME"/>
|
|
||||||
<Participants>
|
|
||||||
</Participants>
|
|
||||||
<CompoundMarkSequence>
|
|
||||||
<Corner SeqID="1" CompoundMarkID="1" Rounding="SP" ZoneSize="3" />
|
|
||||||
<Corner SeqID="2" CompoundMarkID="2" Rounding="Port" ZoneSize="3" />
|
|
||||||
<Corner SeqID="3" CompoundMarkID="4" Rounding="Port" ZoneSize="3" />
|
|
||||||
<Corner SeqID="4" CompoundMarkID="3" Rounding="Starboard" ZoneSize="3" />
|
|
||||||
<Corner SeqID="5" CompoundMarkID="4" Rounding="Port" ZoneSize="3" />
|
|
||||||
<Corner SeqID="6" CompoundMarkID="5" Rounding="SP" ZoneSize="3"/>
|
|
||||||
</CompoundMarkSequence>
|
|
||||||
<Course>
|
|
||||||
<CompoundMark CompoundMarkID="1" Name="Start Line">
|
|
||||||
<Mark SeqId="1" Name="PRO" TargetLat="32.296577" TargetLng="-64.854304" SourceID="101"/>
|
|
||||||
<Mark SeqId="2" Name="PIN" TargetLat="32.293771" TargetLng="-64.855242" SourceID="102"/>
|
|
||||||
</CompoundMark>
|
|
||||||
<CompoundMark CompoundMarkID="2" Name="Marker 1">
|
|
||||||
<Mark Name="Marker1" TargetLat="32.293039" TargetLng="-64.843983" SourceID="103"/>
|
|
||||||
</CompoundMark>
|
|
||||||
<CompoundMark CompoundMarkID="3" Name="Windward Gate">
|
|
||||||
<Mark Name="WGL" SeqId="1" TargetLat="32.28468" TargetLng="-64.850045" SourceID="104"/>
|
|
||||||
<Mark Name="WGR" SeqId="2" TargetLat="32.280164" TargetLng="-64.847591" SourceID="105"/>
|
|
||||||
</CompoundMark>
|
|
||||||
<CompoundMark CompoundMarkID="4" Name="Leeward Gate">
|
|
||||||
<Mark Name="LGL" SeqId="1" TargetLat="32.309693" TargetLng="-64.835249" SourceID="106"/>
|
|
||||||
<Mark Name="LGR" SeqId="2" TargetLat="32.308046" TargetLng="-64.831785" SourceID="107"/>
|
|
||||||
</CompoundMark>
|
|
||||||
<CompoundMark CompoundMarkID="5" Name="Finish Line">
|
|
||||||
<Mark Name="FL" SeqId="1" TargetLat="32.317379" TargetLng="-64.839291" SourceID="108"/>
|
|
||||||
<Mark Name="FR" SeqId="2" TargetLat="32.317257" TargetLng="-64.83626" SourceID="109"/>
|
|
||||||
</CompoundMark>
|
|
||||||
</Course>
|
|
||||||
<CourseLimit>
|
|
||||||
<Limit Lat="32.313922" Lon="-64.837168" SeqID="1"/>
|
|
||||||
<Limit Lat="32.317379" Lon="-64.839291" SeqID="2"/>
|
|
||||||
<Limit Lat="32.317911" Lon="-64.836996" SeqID="3"/>
|
|
||||||
<Limit Lat="32.317257" Lon="-64.83626" SeqID="4"/>
|
|
||||||
<Limit Lat="32.304273" Lon="-64.822834" SeqID="5"/>
|
|
||||||
<Limit Lat="32.279097" Lon="-64.841545" SeqID="6"/>
|
|
||||||
<Limit Lat="32.279604" Lon="-64.849871" SeqID="7"/>
|
|
||||||
<Limit Lat="32.289545" Lon="-64.854162" SeqID="8"/>
|
|
||||||
<Limit Lat="32.290198" Lon="-64.858711" SeqID="9"/>
|
|
||||||
<Limit Lat="32.297164" Lon="-64.856394" SeqID="10"/>
|
|
||||||
<Limit Lat="32.296148" Lon="-64.849184" SeqID="11"/>
|
|
||||||
</CourseLimit>
|
|
||||||
</Race>
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<Race>
|
|
||||||
<RaceID>5326</RaceID>
|
|
||||||
<RaceType>FLEET</RaceType>
|
|
||||||
<CreationTimeDate>RACE_CREATION_TIME</CreationTimeDate>
|
|
||||||
<RaceStartTime Postpone="false" Time="RACE_START_TIME"/>
|
|
||||||
<Participants>
|
|
||||||
</Participants>
|
|
||||||
<CompoundMarkSequence>
|
|
||||||
<Corner SeqID="1" CompoundMarkID="1" Rounding="SP" ZoneSize="3" />
|
|
||||||
<Corner SeqID="2" CompoundMarkID="2" Rounding="Port" ZoneSize="3" />
|
|
||||||
<Corner SeqID="3" CompoundMarkID="4" Rounding="Port" ZoneSize="3" />
|
|
||||||
<Corner SeqID="4" CompoundMarkID="3" Rounding="Starboard" ZoneSize="3" />
|
|
||||||
<Corner SeqID="5" CompoundMarkID="4" Rounding="Port" ZoneSize="3" />
|
|
||||||
<Corner SeqID="6" CompoundMarkID="5" Rounding="SP" ZoneSize="3"/>
|
|
||||||
</CompoundMarkSequence>
|
|
||||||
<Course>
|
|
||||||
<CompoundMark CompoundMarkID="1" Name="Start Line">
|
|
||||||
<Mark SeqId="1" Name="PRO" TargetLat="32.296577" TargetLng="-64.854304" SourceID="101"/>
|
|
||||||
<Mark SeqId="2" Name="PIN" TargetLat="32.293771" TargetLng="-64.855242" SourceID="102"/>
|
|
||||||
</CompoundMark>
|
|
||||||
<CompoundMark CompoundMarkID="2" Name="Marker 1">
|
|
||||||
<Mark Name="Marker1" TargetLat="32.293039" TargetLng="-64.843983" SourceID="103"/>
|
|
||||||
</CompoundMark>
|
|
||||||
<CompoundMark CompoundMarkID="3" Name="Windward Gate">
|
|
||||||
<Mark Name="WGL" SeqId="1" TargetLat="32.28468" TargetLng="-64.850045" SourceID="104"/>
|
|
||||||
<Mark Name="WGR" SeqId="2" TargetLat="32.280164" TargetLng="-64.847591" SourceID="105"/>
|
|
||||||
</CompoundMark>
|
|
||||||
<CompoundMark CompoundMarkID="4" Name="Leeward Gate">
|
|
||||||
<Mark Name="LGL" SeqId="1" TargetLat="32.309693" TargetLng="-64.835249" SourceID="106"/>
|
|
||||||
<Mark Name="LGR" SeqId="2" TargetLat="32.308046" TargetLng="-64.831785" SourceID="107"/>
|
|
||||||
</CompoundMark>
|
|
||||||
<CompoundMark CompoundMarkID="5" Name="Finish Line">
|
|
||||||
<Mark Name="FL" SeqId="1" TargetLat="32.317379" TargetLng="-64.839291" SourceID="108"/>
|
|
||||||
<Mark Name="FR" SeqId="2" TargetLat="32.317257" TargetLng="-64.83626" SourceID="109"/>
|
|
||||||
</CompoundMark>
|
|
||||||
</Course>
|
|
||||||
<CourseLimit>
|
|
||||||
<Limit Lat="32.313922" Lon="-64.837168" SeqID="1"/>
|
|
||||||
<Limit Lat="32.317379" Lon="-64.839291" SeqID="2"/>
|
|
||||||
<Limit Lat="32.317911" Lon="-64.836996" SeqID="3"/>
|
|
||||||
<Limit Lat="32.317257" Lon="-64.83626" SeqID="4"/>
|
|
||||||
<Limit Lat="32.304273" Lon="-64.822834" SeqID="5"/>
|
|
||||||
<Limit Lat="32.279097" Lon="-64.841545" SeqID="6"/>
|
|
||||||
<Limit Lat="32.279604" Lon="-64.849871" SeqID="7"/>
|
|
||||||
<Limit Lat="32.289545" Lon="-64.854162" SeqID="8"/>
|
|
||||||
<Limit Lat="32.290198" Lon="-64.858711" SeqID="9"/>
|
|
||||||
<Limit Lat="32.297164" Lon="-64.856394" SeqID="10"/>
|
|
||||||
<Limit Lat="32.296148" Lon="-64.849184" SeqID="11"/>
|
|
||||||
</CourseLimit>
|
|
||||||
</Race>
|
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
<?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?>
|
||||||
@@ -9,11 +14,11 @@
|
|||||||
<?import javafx.scene.layout.RowConstraints?>
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<AnchorPane fx:id="gameLobbyWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" style="-fx-background-color: rgba(100, 100, 100, 0.2);" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.InGameLobbyController">
|
<AnchorPane fx:id="gameLobbyWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" style="-fx-background-color: rgba(100, 100, 100, 0.2);" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.InGameLobbyController">
|
||||||
<children>
|
<children>
|
||||||
<GridPane style="-fx-background-color: rgba(0, 0, 0, 0.3);" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<GridPane style="-fx-background-color: #f1f1d4;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<children>
|
<children>
|
||||||
<Button fx:id="quitButton" mnemonicParsing="false" onAction="#menuBtnPressed" text="Quit" GridPane.rowIndex="2">
|
<Button fx:id="quitBtn" maxHeight="50.0" maxWidth="125.0" mnemonicParsing="false" onAction="#menuBtnPressed" GridPane.rowIndex="2">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="20.0" />
|
<Insets left="20.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
@@ -66,7 +71,7 @@
|
|||||||
<Font name="Cabin-Bold" size="17.0" />
|
<Font name="Cabin-Bold" size="17.0" />
|
||||||
</font>
|
</font>
|
||||||
</Label>
|
</Label>
|
||||||
<Button fx:id="startButton" disable="true" mnemonicParsing="false" onAction="#startBtnPressed" text="Start!" visible="false" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
<Button fx:id="startButton" disable="true" maxHeight="50.0" maxWidth="125.0" mnemonicParsing="false" onAction="#startBtnPressed" visible="false" GridPane.columnIndex="2" GridPane.rowIndex="2" />
|
||||||
</children>
|
</children>
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
|||||||
@@ -13,20 +13,20 @@
|
|||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<AnchorPane fx:id="lobbyWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.LobbyController">
|
<AnchorPane fx:id="lobbyWrapper" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="780.0" style="-fx-background-color: #f1f1d4;" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.LobbyController">
|
||||||
<children>
|
<children>
|
||||||
<GridPane fx:id="connection" prefHeight="600.0" prefWidth="780.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<GridPane fx:id="connection" prefHeight="600.0" prefWidth="780.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="600.0" minWidth="10.0" prefWidth="600.0" />
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="600.0" minWidth="10.0" prefWidth="303.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="600.0" minWidth="10.0" prefWidth="600.0" />
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="600.0" minWidth="10.0" prefWidth="477.0" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints maxHeight="182.0" minHeight="10.0" prefHeight="182.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="182.0" minHeight="10.0" prefHeight="116.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="434.0" minHeight="10.0" prefHeight="434.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="434.0" minHeight="10.0" prefHeight="348.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="174.0" minHeight="10.0" prefHeight="174.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="174.0" minHeight="10.0" prefHeight="157.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<TableView fx:id="lobbyTable" prefHeight="200.0" prefWidth="1080.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
|
<TableView fx:id="lobbyTable" prefHeight="342.0" prefWidth="680.0" GridPane.columnSpan="2" GridPane.rowIndex="1">
|
||||||
<columns>
|
<columns>
|
||||||
<TableColumn fx:id="gameNameColumn" prefWidth="223.0" text="Game Name" />
|
<TableColumn fx:id="gameNameColumn" prefWidth="223.0" text="Game Name" />
|
||||||
<TableColumn fx:id="hostNameColumn" prefWidth="280.0" text="Host Name" />
|
<TableColumn fx:id="hostNameColumn" prefWidth="280.0" text="Host Name" />
|
||||||
@@ -44,23 +44,22 @@
|
|||||||
<GridPane fx:id="ipPortGridPane" GridPane.rowIndex="2">
|
<GridPane fx:id="ipPortGridPane" GridPane.rowIndex="2">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
|
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<TextField fx:id="addressFld" promptText="Address">
|
<TextField fx:id="addressFld" promptText="Address" GridPane.valignment="TOP">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="50.0" right="20.0" />
|
<Insets left="50.0" right="20.0" top="20.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets />
|
<Insets />
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
</TextField>
|
</TextField>
|
||||||
<TextField fx:id="portFld" promptText="Port Number" GridPane.columnIndex="1">
|
<TextField fx:id="portFld" promptText="Port Number">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="20.0" right="20.0" />
|
<Insets left="50.0" right="20.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</TextField>
|
</TextField>
|
||||||
</children>
|
</children>
|
||||||
@@ -70,31 +69,31 @@
|
|||||||
</GridPane>
|
</GridPane>
|
||||||
<GridPane fx:id="buttonsGridPane" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
<GridPane fx:id="buttonsGridPane" GridPane.columnIndex="1" GridPane.rowIndex="2">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="145.0" minWidth="10.0" prefWidth="132.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="133.0" minWidth="10.0" prefWidth="125.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" />
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="181.0" minWidth="10.0" prefWidth="132.0" />
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
|
<RowConstraints minHeight="10.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<Button mnemonicParsing="false" onAction="#refreshBtnPressed" text="Refresh" GridPane.columnIndex="1">
|
<Button fx:id="refreshBtn" maxHeight="50.0" maxWidth="125.0" mnemonicParsing="false" onAction="#refreshBtnPressed" GridPane.columnIndex="1">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="10.0" right="10.0" />
|
<Insets />
|
||||||
</GridPane.margin></Button>
|
</GridPane.margin></Button>
|
||||||
<Button mnemonicParsing="false" onAction="#addConnectionPressed" text="Add">
|
<Button fx:id="addBtn" maxHeight="50.0" maxWidth="125.0" mnemonicParsing="false" onAction="#addConnectionPressed">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="20.0" />
|
<Insets />
|
||||||
</GridPane.margin></Button>
|
</GridPane.margin></Button>
|
||||||
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="8.0" GridPane.columnIndex="2">
|
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0" spacing="8.0" GridPane.columnIndex="2">
|
||||||
<children>
|
<children>
|
||||||
<Button fx:id="joinGameBtn" mnemonicParsing="false" onAction="#connectParticipate" text="Participate!" />
|
<Button fx:id="joinGameBtn" maxHeight="50.0" maxWidth="125.0" mnemonicParsing="false" onAction="#connectParticipate" prefHeight="50.0" prefWidth="125.0" />
|
||||||
<Button fx:id="spectateButton" mnemonicParsing="false" onAction="#connectSpectate" text="Spectate!" />
|
<Button fx:id="spectateButton" maxHeight="50.0" maxWidth="125.0" mnemonicParsing="false" onAction="#connectSpectate" prefHeight="50.0" prefWidth="125.0" />
|
||||||
</children>
|
</children>
|
||||||
</VBox>
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
<Button mnemonicParsing="false" onAction="#menuBtnPressed" text="Main Menu">
|
<Button fx:id="mainMenuBtn" maxHeight="50.0" maxWidth="125.0" mnemonicParsing="false" onAction="#menuBtnPressed">
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets left="50.0" />
|
<Insets left="50.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
|
|||||||
@@ -5,94 +5,60 @@
|
|||||||
<?import javafx.scene.image.*?>
|
<?import javafx.scene.image.*?>
|
||||||
<?import javafx.scene.layout.*?>
|
<?import javafx.scene.layout.*?>
|
||||||
<?import javafx.scene.text.*?>
|
<?import javafx.scene.text.*?>
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.control.RadioButton?>
|
<?import javafx.scene.control.RadioButton?>
|
||||||
<?import javafx.scene.image.Image?>
|
|
||||||
<?import javafx.scene.image.ImageView?>
|
|
||||||
<?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.Pane?>
|
|
||||||
<?import javafx.scene.layout.RowConstraints?>
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<?import javafx.scene.text.Text?>
|
|
||||||
|
|
||||||
<AnchorPane fx:id="titleWrapper" maxHeight="600.0" maxWidth="800.0" minHeight="600.0" minWidth="800.0" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.TitleController">
|
<AnchorPane fx:id="titleWrapper" maxHeight="600.0" maxWidth="800.0" minHeight="600.0" minWidth="800.0" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="visualiser.Controllers.TitleController">
|
||||||
<children>
|
<children>
|
||||||
<GridPane layoutY="39.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="800.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
<GridPane fx:id="view3DContainer" prefHeight="600.0" prefWidth="800.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
<columnConstraints>
|
<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>
|
</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>
|
||||||
|
</GridPane>
|
||||||
|
<GridPane layoutY="39.0" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="500.0" prefWidth="800.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="318.0" minWidth="10.0" prefWidth="245.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="301.0" minWidth="10.0" prefWidth="301.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||||
|
</columnConstraints>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="175.0" minHeight="10.0" prefHeight="173.0" vgrow="SOMETIMES" />
|
||||||
|
<RowConstraints maxHeight="96.0" minHeight="10.0" prefHeight="27.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 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 minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<Pane prefHeight="20.0" prefWidth="20.0" style="-fx-background-color: #0061ff;" GridPane.columnSpan="4" GridPane.rowIndex="4" GridPane.rowSpan="2">
|
<Button fx:id="btnJoin" maxHeight="80.0" maxWidth="200.0" mnemonicParsing="false" onAction="#joinAGame" GridPane.halignment="RIGHT" GridPane.rowIndex="2">
|
||||||
<children>
|
|
||||||
<Text fx:id="txtTitle" layoutX="167.0" layoutY="136.0" strokeType="OUTSIDE" strokeWidth="0.0" text="The Boat Game!">
|
|
||||||
<font>
|
<font>
|
||||||
<Font name="Comic Sans MS" size="64.0" />
|
<Font name="System Font" size="13.0" />
|
||||||
</font>
|
|
||||||
</Text>
|
|
||||||
<Text layoutX="690.0" layoutY="80.0" strokeType="OUTSIDE" strokeWidth="0.0" text="TM">
|
|
||||||
<font>
|
|
||||||
<Font name="Comic Sans MS" size="12.0" />
|
|
||||||
</font>
|
|
||||||
</Text>
|
|
||||||
<RadioButton fx:id="nightModeRD" layoutX="681.0" layoutY="168.0" mnemonicParsing="false" onAction="#setNightMode" text="Night Mode" />
|
|
||||||
<RadioButton fx:id="dayModeRD" layoutX="574.0" layoutY="168.0" mnemonicParsing="false" onAction="#setDayMode" selected="true" text="Day Mode" />
|
|
||||||
<Button layoutX="28.0" layoutY="152.0" mnemonicParsing="false" onAction="#showControls" text="Controls" />
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
<Pane fx:id="menuPane" prefHeight="20.0" prefWidth="20.0" style="-fx-background-color: #6be6ff;" GridPane.columnSpan="4" GridPane.rowSpan="4">
|
|
||||||
<children>
|
|
||||||
<ImageView fx:id="imgBoat" fitHeight="404.0" fitWidth="296.0" layoutX="268.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/boat.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<ImageView fx:id="imgCloud1" fitHeight="291.0" fitWidth="307.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/cloud.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<ImageView fx:id="imgWhale" fitHeight="113.0" fitWidth="98.0" layoutX="69.0" layoutY="302.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/whale.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<ImageView fx:id="imgCloud2" fitHeight="291.0" fitWidth="307.0" layoutX="501.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/cloud.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<ImageView fx:id="imgSun" fitHeight="154.0" fitWidth="145.0" layoutX="701.0" layoutY="-39.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../images/sun.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<Button fx:id="btnJoin" layoutX="78.0" layoutY="149.0" mnemonicParsing="false" onAction="#joinAGame" prefHeight="31.0" prefWidth="130.0" text="Join a Game">
|
|
||||||
<font>
|
|
||||||
<Font name="Comic Sans MS Bold" size="16.0" />
|
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Button>
|
||||||
<Button layoutX="578.0" layoutY="150.0" mnemonicParsing="false" onAction="#hostAGame" prefHeight="31.0" prefWidth="130.0" text="Host a Game">
|
<Button fx:id="controlsBtn" maxHeight="80.0" maxWidth="200.0" mnemonicParsing="false" onAction="#showControls" GridPane.halignment="RIGHT" GridPane.rowIndex="4" />
|
||||||
|
<Button fx:id="tutorialButton" maxHeight="80.0" maxWidth="200.0" mnemonicParsing="false" onAction="#tutorialStartPressed" GridPane.halignment="RIGHT" GridPane.rowIndex="3" />
|
||||||
|
<Button fx:id="hostAGameBtn" maxHeight="80.0" maxWidth="200.0" mnemonicParsing="false" onAction="#hostAGame" GridPane.halignment="RIGHT" GridPane.rowIndex="1" />
|
||||||
|
<RadioButton fx:id="nightModeRD" mnemonicParsing="false" onAction="#setNightMode" text="Night Mode" textFill="WHITE" GridPane.columnIndex="3" GridPane.halignment="CENTER" GridPane.rowIndex="5" />
|
||||||
|
<RadioButton fx:id="dayModeRD" mnemonicParsing="false" onAction="#setDayMode" selected="true" text="Day Mode" textFill="WHITE" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.rowIndex="5" />
|
||||||
|
<Label text="Smooth Sailing" textFill="WHITE" GridPane.columnSpan="2" GridPane.halignment="RIGHT">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Comic Sans MS Bold" size="16.0" />
|
<Font name="Futura Medium Italic" size="72.0" />
|
||||||
</font>
|
</font>
|
||||||
</Button>
|
</Label>
|
||||||
<Label fx:id="tutorialLabel" alignment="CENTER" layoutX="94.0" layoutY="223.0" onMouseClicked="#tutorialStartPressed" prefHeight="167.0" prefWidth="206.0" style="-fx-shape: "M 45.673,0 C 67.781,0 85.703,12.475 85.703,27.862 C 85.703,43.249 67.781,55.724 45.673,55.724 C 38.742,55.724 32.224,54.497 26.539,52.34 C 15.319,56.564 0,64.542 0,64.542 C 0,64.542 9.989,58.887 14.107,52.021 C 15.159,50.266 15.775,48.426 16.128,46.659 C 9.618,41.704 5.643,35.106 5.643,27.862 C 5.643,12.475 23.565,0 45.673,0 M 45.673,2.22 C 24.824,2.22 7.862,13.723 7.862,27.863 C 7.862,34.129 11.275,40.177 17.472,44.893 L 18.576,45.734 L 18.305,47.094 C 17.86,49.324 17.088,51.366 16.011,53.163 C 15.67,53.73 15.294,54.29 14.891,54.837 C 18.516,53.191 22.312,51.561 25.757,50.264 L 26.542,49.968 L 27.327,50.266 C 32.911,52.385 39.255,53.505 45.673,53.505 C 66.522,53.505 83.484,42.002 83.484,27.862 C 83.484,13.722 66.522,2.22 45.673,2.22 L 45.673,2.22 z "; -fx-background-color: black, white; -fx-background-insets: 0,1; -fx-padding: 50;" text="How do you play this game? Click here!" textAlignment="CENTER" wrapText="true" />
|
|
||||||
</children>
|
|
||||||
</Pane>
|
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
Reference in New Issue
Block a user