mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
@@ -13,6 +13,9 @@ import org.slf4j.LoggerFactory;
|
|||||||
import seng302.discoveryServer.DiscoveryServer;
|
import seng302.discoveryServer.DiscoveryServer;
|
||||||
import seng302.visualiser.controllers.ViewManager;
|
import seng302.visualiser.controllers.ViewManager;
|
||||||
|
|
||||||
|
import java.util.Timer;
|
||||||
|
import java.util.TimerTask;
|
||||||
|
|
||||||
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);
|
||||||
@@ -92,6 +95,17 @@ public class App extends Application {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
|
/*
|
||||||
|
* Do not trust Java to do garbage collection
|
||||||
|
*/
|
||||||
|
new Timer().schedule(new TimerTask() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
System.gc();
|
||||||
|
}
|
||||||
|
}, 0, 1200);
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
parseArgs(args);
|
parseArgs(args);
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
|
|||||||
@@ -158,7 +158,13 @@ public abstract class Message {
|
|||||||
* @return The current buffer as a byte array
|
* @return The current buffer as a byte array
|
||||||
*/
|
*/
|
||||||
public byte[] getBuffer(){
|
public byte[] getBuffer(){
|
||||||
return buffer.array();
|
byte[] bytes = buffer.array();
|
||||||
|
|
||||||
|
// buffer.reset();
|
||||||
|
// buffer.clear();
|
||||||
|
// buffer = null;
|
||||||
|
|
||||||
|
return bytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class MapMaker {
|
|||||||
private int index = 0;
|
private int index = 0;
|
||||||
private XMLGenerator xmlGenerator = new XMLGenerator();
|
private XMLGenerator xmlGenerator = new XMLGenerator();
|
||||||
|
|
||||||
private List<String> maps = new ArrayList<>(Arrays.asList("default.xml", "horseshoe.xml"));
|
private List<String> maps = new ArrayList<>(Arrays.asList("default.xml", "horseshoe.xml", "loop.xml"));
|
||||||
|
|
||||||
public static MapMaker getInstance() {
|
public static MapMaker getInstance() {
|
||||||
if (instance == null) {
|
if (instance == null) {
|
||||||
|
|||||||
@@ -2,17 +2,33 @@ package seng302.visualiser.controllers;
|
|||||||
|
|
||||||
import com.jfoenix.controls.JFXButton;
|
import com.jfoenix.controls.JFXButton;
|
||||||
import com.jfoenix.controls.JFXDialog;
|
import com.jfoenix.controls.JFXDialog;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
import javafx.application.Platform;
|
import javafx.application.Platform;
|
||||||
import javafx.collections.ListChangeListener;
|
import javafx.collections.ListChangeListener;
|
||||||
|
import javafx.event.EventHandler;
|
||||||
import javafx.fxml.FXML;
|
import javafx.fxml.FXML;
|
||||||
import javafx.fxml.FXMLLoader;
|
import javafx.fxml.FXMLLoader;
|
||||||
import javafx.fxml.Initializable;
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.geometry.Point3D;
|
||||||
|
import javafx.scene.Group;
|
||||||
import javafx.scene.control.Label;
|
import javafx.scene.control.Label;
|
||||||
import javafx.scene.control.ScrollPane;
|
import javafx.scene.control.ScrollPane;
|
||||||
|
import javafx.scene.input.MouseEvent;
|
||||||
import javafx.scene.layout.AnchorPane;
|
import javafx.scene.layout.AnchorPane;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
import javafx.scene.layout.StackPane;
|
import javafx.scene.layout.StackPane;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
import javafx.scene.paint.Color;
|
import javafx.scene.paint.Color;
|
||||||
|
import javafx.scene.transform.Rotate;
|
||||||
|
import javafx.scene.transform.Scale;
|
||||||
|
import javafx.scene.transform.Translate;
|
||||||
import seng302.discoveryServer.DiscoveryServerClient;
|
import seng302.discoveryServer.DiscoveryServerClient;
|
||||||
import seng302.gameServer.GameStages;
|
import seng302.gameServer.GameStages;
|
||||||
import seng302.gameServer.GameState;
|
import seng302.gameServer.GameState;
|
||||||
@@ -27,13 +43,10 @@ import seng302.utilities.Sounds;
|
|||||||
import seng302.visualiser.MapPreview;
|
import seng302.visualiser.MapPreview;
|
||||||
import seng302.visualiser.controllers.cells.PlayerCell;
|
import seng302.visualiser.controllers.cells.PlayerCell;
|
||||||
import seng302.visualiser.controllers.dialogs.BoatCustomizeController;
|
import seng302.visualiser.controllers.dialogs.BoatCustomizeController;
|
||||||
|
import seng302.visualiser.controllers.dialogs.PopupDialogController;
|
||||||
import java.io.IOException;
|
import seng302.visualiser.controllers.dialogs.TokenInfoDialogController;
|
||||||
import java.net.URL;
|
import seng302.visualiser.fxObjects.assets_3D.ModelFactory;
|
||||||
import java.util.ArrayList;
|
import seng302.visualiser.fxObjects.assets_3D.ModelType;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.ResourceBundle;
|
|
||||||
|
|
||||||
public class LobbyController implements Initializable {
|
public class LobbyController implements Initializable {
|
||||||
|
|
||||||
@@ -57,10 +70,13 @@ public class LobbyController implements Initializable {
|
|||||||
private AnchorPane serverMap;
|
private AnchorPane serverMap;
|
||||||
@FXML
|
@FXML
|
||||||
private Label roomLabel;
|
private Label roomLabel;
|
||||||
|
@FXML
|
||||||
|
private Pane speedTokenPane, handlingTokenPane, windWalkerTokenPane, bumperTokenPane, randomTokenPane;
|
||||||
//---------FXML END---------//
|
//---------FXML END---------//
|
||||||
|
|
||||||
private RaceState raceState;
|
private RaceState raceState;
|
||||||
private JFXDialog customizationDialog;
|
private JFXDialog customizationDialog;
|
||||||
|
private JFXDialog tokenInfoDialog;
|
||||||
public Color playersColor;
|
public Color playersColor;
|
||||||
private Map<Integer, ClientYacht> playerBoats;
|
private Map<Integer, ClientYacht> playerBoats;
|
||||||
private Double mapWidth = INITIAL_MAP_WIDTH, mapHeight = INITIAL_MAP_HEIGHT;
|
private Double mapWidth = INITIAL_MAP_WIDTH, mapHeight = INITIAL_MAP_HEIGHT;
|
||||||
@@ -128,6 +144,107 @@ public class LobbyController implements Initializable {
|
|||||||
beginRaceButton.setOnMouseEntered(e -> Sounds.playHoverSound());
|
beginRaceButton.setOnMouseEntered(e -> Sounds.playHoverSound());
|
||||||
|
|
||||||
initMapPreview();
|
initMapPreview();
|
||||||
|
initTokenPreviews();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialises the tokens in the side panel
|
||||||
|
*/
|
||||||
|
private void initTokenPreviews() {
|
||||||
|
Group speedToken = ModelFactory.importModel(ModelType.VELOCITY_PICKUP).getAssets();
|
||||||
|
Group handlingToken = ModelFactory.importModel(ModelType.HANDLING_PICKUP).getAssets();
|
||||||
|
Group windWalkerToken = ModelFactory.importModel(ModelType.WIND_WALKER_PICKUP).getAssets();
|
||||||
|
Group bumperToken = ModelFactory.importModel(ModelType.BUMPER_PICKUP).getAssets();
|
||||||
|
Group randomToken = ModelFactory.importModel(ModelType.RANDOM_PICKUP).getAssets();
|
||||||
|
|
||||||
|
HashMap<Pane, Group> tokenPanes = new HashMap<>();
|
||||||
|
tokenPanes.put(speedTokenPane, speedToken);
|
||||||
|
tokenPanes.put(handlingTokenPane, handlingToken);
|
||||||
|
tokenPanes.put(windWalkerTokenPane, windWalkerToken);
|
||||||
|
tokenPanes.put(bumperTokenPane, bumperToken);
|
||||||
|
tokenPanes.put(randomTokenPane, randomToken);
|
||||||
|
|
||||||
|
Scale hoverScale = new Scale(1.2, 1.2, 1.2);
|
||||||
|
|
||||||
|
tokenPanes.entrySet().forEach((entry) -> {
|
||||||
|
Pane thisPane = entry.getKey();
|
||||||
|
Group thisToken = entry.getValue();
|
||||||
|
|
||||||
|
thisToken.getTransforms().addAll(
|
||||||
|
new Translate(40, 50, 0),
|
||||||
|
new Scale(13, 13, 13));
|
||||||
|
|
||||||
|
thisPane.setOnMouseEntered(event -> {
|
||||||
|
thisToken.getTransforms().add(hoverScale);
|
||||||
|
});
|
||||||
|
thisPane.setOnMouseExited(event -> {
|
||||||
|
thisToken.getTransforms().remove(hoverScale);
|
||||||
|
});
|
||||||
|
thisPane.setOnMouseReleased(event -> {
|
||||||
|
tokenInfoDialog = makeTokenDialog(thisPane);
|
||||||
|
tokenInfoDialog.show();
|
||||||
|
});
|
||||||
|
|
||||||
|
thisPane.getChildren().add(thisToken);
|
||||||
|
});
|
||||||
|
|
||||||
|
//Hacky rotations for wind and random to level it in the plane
|
||||||
|
windWalkerToken.getTransforms().addAll(
|
||||||
|
new Rotate(-70, new Point3D(1, 0, 0)),
|
||||||
|
new Translate(0, 2,0)
|
||||||
|
);
|
||||||
|
randomToken.getTransforms().addAll(
|
||||||
|
new Rotate(-90, new Point3D(1, 0, 0)),
|
||||||
|
new Translate(0, 0,1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private JFXDialog makeTokenDialog(Pane inducingPane) {
|
||||||
|
String header = "...";
|
||||||
|
String body = "Nothing to see here";
|
||||||
|
ModelType modelType = ModelType.RANDOM_PICKUP;
|
||||||
|
|
||||||
|
if (inducingPane == speedTokenPane) {
|
||||||
|
header = "Speed Boost";
|
||||||
|
body = "Increases your max velocity";
|
||||||
|
modelType = ModelType.VELOCITY_PICKUP;
|
||||||
|
} else if (inducingPane == handlingTokenPane) {
|
||||||
|
header = "Handling Boost";
|
||||||
|
body = "Increases your turing rate";
|
||||||
|
modelType = ModelType.HANDLING_PICKUP;
|
||||||
|
} else if (inducingPane == windWalkerTokenPane) {
|
||||||
|
header = "Wind Walker";
|
||||||
|
body = "The wind now rotates with you, giving you your optimal speed in all directions";
|
||||||
|
modelType = ModelType.WIND_WALKER_PICKUP;
|
||||||
|
} else if (inducingPane == bumperTokenPane) {
|
||||||
|
header = "Bumper";
|
||||||
|
body = "While this is active, upon hitting another boat, you will power it down for a short time";
|
||||||
|
modelType = ModelType.BUMPER_PICKUP;
|
||||||
|
} else if (inducingPane == randomTokenPane) {
|
||||||
|
header = "Random";
|
||||||
|
body = "A 50% chance of becoming any other token and a 50% chance of slowing your boat for a time";
|
||||||
|
modelType = ModelType.RANDOM_PICKUP;
|
||||||
|
}
|
||||||
|
|
||||||
|
FXMLLoader dialog = new FXMLLoader(
|
||||||
|
getClass().getResource("/views/dialogs/TokenInfoDialog.fxml"));
|
||||||
|
|
||||||
|
JFXDialog tokenInfoDialog = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
tokenInfoDialog = new JFXDialog(serverListMainStackPane, dialog.load(),
|
||||||
|
JFXDialog.DialogTransition.CENTER);
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
TokenInfoDialogController controller = dialog.getController();
|
||||||
|
controller.setParentController(this);
|
||||||
|
controller.setHeader(header);
|
||||||
|
controller.setContent(body);
|
||||||
|
controller.setToken(modelType);
|
||||||
|
return tokenInfoDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
private JFXDialog createCustomizeDialog() {
|
private JFXDialog createCustomizeDialog() {
|
||||||
@@ -252,6 +369,10 @@ public class LobbyController implements Initializable {
|
|||||||
customizationDialog.close();
|
customizationDialog.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void closeTokenInfoDialog() {
|
||||||
|
tokenInfoDialog.close();
|
||||||
|
}
|
||||||
|
|
||||||
public void setRoomCode(String roomCode) {
|
public void setRoomCode(String roomCode) {
|
||||||
roomLabel.setText("Room: " + roomCode);
|
roomLabel.setText("Room: " + roomCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +1,12 @@
|
|||||||
package seng302.visualiser.controllers;
|
package seng302.visualiser.controllers;
|
||||||
|
|
||||||
import com.jfoenix.controls.JFXDecorator;
|
|
||||||
import com.jfoenix.controls.JFXSnackbar;
|
|
||||||
import javafx.application.Platform;
|
|
||||||
import javafx.fxml.FXML;
|
|
||||||
import javafx.fxml.FXMLLoader;
|
|
||||||
import javafx.fxml.Initializable;
|
|
||||||
import javafx.scene.Parent;
|
|
||||||
import javafx.scene.Scene;
|
|
||||||
import javafx.scene.SceneAntialiasing;
|
|
||||||
import javafx.scene.image.Image;
|
|
||||||
import javafx.scene.layout.StackPane;
|
|
||||||
import javafx.stage.Stage;
|
|
||||||
import seng302.gameServer.ServerAdvertiser;
|
|
||||||
import seng302.utilities.Sounds;
|
|
||||||
import seng302.visualiser.GameClient;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
import javafx.application.Platform;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.scene.layout.StackPane;
|
||||||
|
import javafx.stage.Stage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Kusal on 26-Sep-17.
|
* Created by Kusal on 26-Sep-17.
|
||||||
@@ -37,7 +25,7 @@ public class SplashScreenController implements Initializable{
|
|||||||
class SplashScreen extends Thread {
|
class SplashScreen extends Thread {
|
||||||
public void run(){
|
public void run(){
|
||||||
try {
|
try {
|
||||||
Thread.sleep(2000);
|
Thread.sleep(3000);
|
||||||
Platform.runLater(new Runnable() {
|
Platform.runLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|||||||
@@ -302,7 +302,7 @@ public class ViewManager {
|
|||||||
Stage stage = new Stage();
|
Stage stage = new Stage();
|
||||||
initialStartView(stage);
|
initialStartView(stage);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
logger.warn("Could not go to start view");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -27,7 +27,7 @@ public class KeyBindingDialogController implements Initializable {
|
|||||||
@FXML
|
@FXML
|
||||||
private Label closeLabel;
|
private Label closeLabel;
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton zoomInbtn;
|
private JFXButton zoomInBtn;
|
||||||
@FXML
|
@FXML
|
||||||
private JFXButton zoomOutBtn;
|
private JFXButton zoomOutBtn;
|
||||||
@FXML
|
@FXML
|
||||||
@@ -43,6 +43,8 @@ public class KeyBindingDialogController implements Initializable {
|
|||||||
@FXML
|
@FXML
|
||||||
private JFXButton resetBtn;
|
private JFXButton resetBtn;
|
||||||
@FXML
|
@FXML
|
||||||
|
private JFXButton confirmBtn;
|
||||||
|
@FXML
|
||||||
private Label upwindLabel;
|
private Label upwindLabel;
|
||||||
@FXML
|
@FXML
|
||||||
private Label downwindLabel;
|
private Label downwindLabel;
|
||||||
@@ -70,7 +72,7 @@ public class KeyBindingDialogController implements Initializable {
|
|||||||
gameKeyBind = GameKeyBind.getInstance();
|
gameKeyBind = GameKeyBind.getInstance();
|
||||||
buttons = new ArrayList<>();
|
buttons = new ArrayList<>();
|
||||||
Collections.addAll(buttons,
|
Collections.addAll(buttons,
|
||||||
zoomInbtn, zoomOutBtn, vmgBtn, sailInOutBtn, tackGybeBtn, upwindBtn, downwindBtn,
|
zoomInBtn, zoomOutBtn, vmgBtn, sailInOutBtn, tackGybeBtn, upwindBtn, downwindBtn,
|
||||||
viewButton, rightButton, leftButton, forwardButton, backwardButton);
|
viewButton, rightButton, leftButton, forwardButton, backwardButton);
|
||||||
bindButtonWithAction();
|
bindButtonWithAction();
|
||||||
loadKeyBind();
|
loadKeyBind();
|
||||||
@@ -91,6 +93,7 @@ public class KeyBindingDialogController implements Initializable {
|
|||||||
});
|
});
|
||||||
|
|
||||||
closeLabel.setOnMouseClicked(event -> ViewManager.getInstance().closeKeyBindingDialog());
|
closeLabel.setOnMouseClicked(event -> ViewManager.getInstance().closeKeyBindingDialog());
|
||||||
|
confirmBtn.setOnMouseClicked(event -> ViewManager.getInstance().closeKeyBindingDialog());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
package seng302.visualiser.controllers.dialogs;
|
||||||
|
|
||||||
|
import com.jfoenix.controls.JFXButton;
|
||||||
|
import com.jfoenix.controls.JFXTextArea;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.ResourceBundle;
|
||||||
|
import javafx.event.EventHandler;
|
||||||
|
import javafx.fxml.FXML;
|
||||||
|
import javafx.fxml.Initializable;
|
||||||
|
import javafx.geometry.Point3D;
|
||||||
|
import javafx.scene.Group;
|
||||||
|
import javafx.scene.control.Button;
|
||||||
|
import javafx.scene.control.Label;
|
||||||
|
import javafx.scene.control.TextArea;
|
||||||
|
import javafx.scene.input.MouseEvent;
|
||||||
|
import javafx.scene.layout.Pane;
|
||||||
|
import javafx.scene.transform.Rotate;
|
||||||
|
import javafx.scene.transform.Scale;
|
||||||
|
import javafx.scene.transform.Translate;
|
||||||
|
import seng302.utilities.Sounds;
|
||||||
|
import seng302.visualiser.controllers.LobbyController;
|
||||||
|
import seng302.visualiser.fxObjects.assets_3D.ModelFactory;
|
||||||
|
import seng302.visualiser.fxObjects.assets_3D.ModelType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by wmu16 on 28/09/17.
|
||||||
|
*/
|
||||||
|
public class TokenInfoDialogController implements Initializable {
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Label headerLabel;
|
||||||
|
@FXML
|
||||||
|
private TextArea contentText;
|
||||||
|
@FXML
|
||||||
|
private Pane tokenPane;
|
||||||
|
@FXML
|
||||||
|
private Button optionButton;
|
||||||
|
|
||||||
|
private LobbyController lobbyController;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initialize(URL location, ResourceBundle resources) {
|
||||||
|
optionButton.setOnMouseReleased(event -> {
|
||||||
|
Sounds.playButtonClick();
|
||||||
|
lobbyController.closeTokenInfoDialog();
|
||||||
|
});
|
||||||
|
|
||||||
|
contentText.setEditable(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setContent(String content) {
|
||||||
|
contentText.setText(content);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeader(String header) {
|
||||||
|
this.headerLabel.setText(header);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setToken(ModelType token) {
|
||||||
|
tokenPane.getChildren().clear();
|
||||||
|
|
||||||
|
Group tokenObject = ModelFactory.importModel(token).getAssets();
|
||||||
|
|
||||||
|
tokenObject.getTransforms().addAll(
|
||||||
|
new Translate(138 / 2, 138 / 2, 0),
|
||||||
|
new Scale(20, 20, 20));
|
||||||
|
|
||||||
|
if (token == ModelType.WIND_WALKER_PICKUP) {
|
||||||
|
tokenObject.getTransforms().addAll(
|
||||||
|
new Rotate(-70, new Point3D(1, 0, 0)),
|
||||||
|
new Translate(0, 2, 0)
|
||||||
|
);
|
||||||
|
} else if (token == ModelType.RANDOM_PICKUP) {
|
||||||
|
tokenObject.getTransforms().addAll(
|
||||||
|
new Rotate(-90, new Point3D(1, 0, 0)),
|
||||||
|
new Translate(0, 0, 1)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
tokenPane.getChildren().add(tokenObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setParentController(LobbyController lobbyController) {
|
||||||
|
this.lobbyController = lobbyController;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -13,7 +13,8 @@ public enum BoatMeshType {
|
|||||||
PIRATE_SHIP("pirateship_hull.stl", "pirateship_mast.stl", -0.5415, "pirateship_mainsail.stl",
|
PIRATE_SHIP("pirateship_hull.stl", "pirateship_mast.stl", -0.5415, "pirateship_mainsail.stl",
|
||||||
-0.5415, "pirateship_frontsail.stl", true, 1.2, 1.6, 1.2),
|
-0.5415, "pirateship_frontsail.stl", true, 1.2, 1.6, 1.2),
|
||||||
DUCKY("ducky_hull.stl", "ducky_mast.stl", -2.18539, "ducky_sail.stl", -2.18539, "ducky_eyes.stl", false, 1.2, 1.1, 1.4),
|
DUCKY("ducky_hull.stl", "ducky_mast.stl", -2.18539, "ducky_sail.stl", -2.18539, "ducky_eyes.stl", false, 1.2, 1.1, 1.4),
|
||||||
PARROT("parrot_hull.stl", null, 0, "parrot_sail.stl", 0, "parrot_features.stl", true, 1, 1, 1);
|
PARROT("parrot_hull.stl", null, 0, "parrot_sail.stl", 0, "parrot_features.stl", true, 1, 1, 1),
|
||||||
|
WAKA("waka_hull.stl", "waka_mast.stl", 0, "waka_sail.stl", 0, null, true, 1.7, 0.5, 1.5);
|
||||||
|
|
||||||
final String hullFile, mastFile, sailFile, jibFile;
|
final String hullFile, mastFile, sailFile, jibFile;
|
||||||
final double mastOffset, sailOffset;
|
final double mastOffset, sailOffset;
|
||||||
@@ -21,7 +22,7 @@ public enum BoatMeshType {
|
|||||||
public final double accelerationMultiplier;
|
public final double accelerationMultiplier;
|
||||||
public final double turnStep;
|
public final double turnStep;
|
||||||
final boolean fixedSail;
|
final boolean fixedSail;
|
||||||
final static BoatMeshType[] boatTypes = new BoatMeshType[]{DINGHY, CATAMARAN, PIRATE_SHIP, DUCKY, PARROT};
|
final static BoatMeshType[] boatTypes = new BoatMeshType[]{DINGHY, CATAMARAN, PIRATE_SHIP, DUCKY, PARROT, WAKA};
|
||||||
|
|
||||||
BoatMeshType(String hullFile, String mastFile, double mastOffset, String sailFile,
|
BoatMeshType(String hullFile, String mastFile, double mastOffset, String sailFile,
|
||||||
double sailOffset, String jibFile, boolean fixedSail, double maxSpeedMultiplier, double accelerationMultiplier, double turnStep) {
|
double sailOffset, String jibFile, boolean fixedSail, double maxSpeedMultiplier, double accelerationMultiplier, double turnStep) {
|
||||||
|
|||||||
@@ -80,30 +80,6 @@ public class ModelFactory {
|
|||||||
return bo;
|
return bo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static BoatModel boatRotatingView(BoatMeshType boatType, Color primaryColour) {
|
|
||||||
Group boatAssets = getUnmodifiedBoatModel(boatType, primaryColour);
|
|
||||||
boatAssets.getTransforms().addAll(
|
|
||||||
new Scale(40, 40, 40),
|
|
||||||
new Rotate(90, new Point3D(0,0,1)),
|
|
||||||
new Rotate(90, new Point3D(0, 1, 0))
|
|
||||||
);
|
|
||||||
|
|
||||||
final Rotate animationRotate = new Rotate(0, new Point3D(1,1,1));
|
|
||||||
boatAssets.getTransforms().add(animationRotate);
|
|
||||||
|
|
||||||
return new BoatModel(boatAssets, new AnimationTimer() {
|
|
||||||
|
|
||||||
private double rotation = 0;
|
|
||||||
private Rotate rotate = animationRotate;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handle(long now) {
|
|
||||||
rotation += 0.5;
|
|
||||||
rotate.setAngle(rotation);
|
|
||||||
}
|
|
||||||
}, boatType);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static BoatModel boatGameView(BoatMeshType boatType, Color primaryColour) {
|
public static BoatModel boatGameView(BoatMeshType boatType, Color primaryColour) {
|
||||||
Group boatAssets = getUnmodifiedBoatModel(boatType, primaryColour);
|
Group boatAssets = getUnmodifiedBoatModel(boatType, primaryColour);
|
||||||
boatAssets.getTransforms().setAll(
|
boatAssets.getTransforms().setAll(
|
||||||
@@ -117,23 +93,26 @@ public class ModelFactory {
|
|||||||
Group boatAssets = new Group();
|
Group boatAssets = new Group();
|
||||||
MeshView hull = importBoatSTL(boatType.hullFile);
|
MeshView hull = importBoatSTL(boatType.hullFile);
|
||||||
hull.setMaterial(new PhongMaterial(primaryColour));
|
hull.setMaterial(new PhongMaterial(primaryColour));
|
||||||
MeshView sail = importBoatSTL(boatType.sailFile);
|
boatAssets.getChildren().add(hull);
|
||||||
sail.setMaterial(
|
|
||||||
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.BLACK : Color.WHITE)
|
|
||||||
);
|
|
||||||
|
|
||||||
boatAssets.getChildren().addAll(hull, sail);
|
|
||||||
|
|
||||||
if (boatType.mastFile != null) {
|
if (boatType.mastFile != null) {
|
||||||
MeshView mast = importBoatSTL(boatType.mastFile);
|
MeshView mast = importBoatSTL(boatType.mastFile);
|
||||||
mast.setMaterial(new PhongMaterial(primaryColour));
|
mast.setMaterial(new PhongMaterial(primaryColour));
|
||||||
boatAssets.getChildren().add(mast);
|
boatAssets.getChildren().add(mast);
|
||||||
|
} else {
|
||||||
|
boatAssets.getChildren().add(new Group());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MeshView sail = importBoatSTL(boatType.sailFile);
|
||||||
|
sail.setMaterial(
|
||||||
|
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.DARKGRAY : Color.WHITE)
|
||||||
|
);
|
||||||
|
boatAssets.getChildren().add(sail);
|
||||||
|
|
||||||
if (boatType.jibFile != null) {
|
if (boatType.jibFile != null) {
|
||||||
MeshView jib = importBoatSTL(boatType.jibFile);
|
MeshView jib = importBoatSTL(boatType.jibFile);
|
||||||
sail.setMaterial(
|
jib.setMaterial(
|
||||||
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.DARKGRAY : Color.WHITE)
|
new PhongMaterial(boatType == BoatMeshType.PARROT ? Color.BLACK : Color.WHITE)
|
||||||
);
|
);
|
||||||
boatAssets.getChildren().add(jib);
|
boatAssets.getChildren().add(jib);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,3 +66,11 @@
|
|||||||
/*-fx-background-size: cover;*/
|
/*-fx-background-size: cover;*/
|
||||||
-fx-background-color: dodgerblue;
|
-fx-background-color: dodgerblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tokenView {
|
||||||
|
-fx-cursor: hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tokenGridView StackPane {
|
||||||
|
-fx-background-color: white;
|
||||||
|
}
|
||||||
@@ -1,10 +1,50 @@
|
|||||||
#background {
|
.root {
|
||||||
-fx-background-color: #E7F1F8;
|
-fx-effect: -fx-pp-dropshadow-dark;
|
||||||
|
-fx-background-radius: 5;
|
||||||
|
-fx-padding: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
#rootPane {
|
||||||
|
-fx-background-image: url("/images/waves.png");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#headText {
|
#headText {
|
||||||
-fx-background-color: transparent;
|
|
||||||
-fx-font-size: 52px;
|
-fx-font-size: 52px;
|
||||||
-fx-text-fill: -fx-pp-light-text-color;
|
-fx-text-fill: rgb(30, 30, 30);
|
||||||
-fx-effect: -fx-pp-dropshadow-headers;
|
-fx-effect: -fx-pp-dropshadow-dark;
|
||||||
|
}
|
||||||
|
|
||||||
|
#subHeadLabel {
|
||||||
|
-fx-text-fill: rgb(30, 30, 30);
|
||||||
|
-fx-effect: -fx-pp-dropshadow-dark;
|
||||||
|
-fx-font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.materialDesign-purple .arc {
|
||||||
|
-fx-stroke: #ab47bc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.materialDesign-blue .arc {
|
||||||
|
-fx-stroke: #2962ff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.materialDesign-cyan .arc {
|
||||||
|
-fx-stroke: #00b8d4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.materialDesign-green .arc {
|
||||||
|
-fx-stroke: #00c853;
|
||||||
|
}
|
||||||
|
|
||||||
|
.materialDesign-yellow .arc {
|
||||||
|
-fx-stroke: #ffd600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.materialDesign-orange .arc {
|
||||||
|
-fx-stroke: #ff6d00;
|
||||||
|
}
|
||||||
|
|
||||||
|
.materialDesign-red .arc {
|
||||||
|
-fx-stroke: #d50000;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
.text-area {
|
||||||
|
-fx-background-insets: 0;
|
||||||
|
-fx-background-color: transparent, white, transparent, white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-area .content {
|
||||||
|
-fx-background-color: transparent, white, transparent, white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-area:focused .content {
|
||||||
|
-fx-background-color: transparent, white, transparent, white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-area:focused {
|
||||||
|
-fx-highlight-fill: #7ecfff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-area .content {
|
||||||
|
-fx-padding: 10px;
|
||||||
|
-fx-text-fill: gray;
|
||||||
|
-fx-highlight-fill: #7ecfff;
|
||||||
|
}
|
||||||
@@ -35,14 +35,14 @@ JFXToggleButton {
|
|||||||
-fx-text-fill: -fx-pp-theme-color;
|
-fx-text-fill: -fx-pp-theme-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
#resetBtn {
|
#resetBtn, #confirmBtn {
|
||||||
-fx-background-color: -fx-pp-theme-color;
|
-fx-background-color: -fx-pp-theme-color;
|
||||||
-fx-text-fill: -fx-pp-front-color;
|
-fx-text-fill: -fx-pp-front-color;
|
||||||
-fx-effect: -fx-pp-dropshadow-light;
|
-fx-effect: -fx-pp-dropshadow-light;
|
||||||
-fx-font-size: 18;
|
-fx-font-size: 18;
|
||||||
}
|
}
|
||||||
|
|
||||||
#resetBtn:hover {
|
#resetBtn:hover, #confirmBtn:hover {
|
||||||
-fx-font-size: 20;
|
-fx-font-size: 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<RaceDefinition>
|
||||||
|
|
||||||
|
<CourseName> Loopty Loop </CourseName>
|
||||||
|
|
||||||
|
<CentralLat> 57.6679590 </CentralLat>
|
||||||
|
<CentralLng> 11.8503233 </CentralLng>
|
||||||
|
|
||||||
|
<MaxPlayers> 5 </MaxPlayers>
|
||||||
|
|
||||||
|
<Marks>
|
||||||
|
<CompoundMark CompoundMarkID="1">
|
||||||
|
<Mark Lat="57.6675700" Lng="11.8359880"/>
|
||||||
|
<Mark Lat="57.667610" Lng="11.833473"/>
|
||||||
|
</CompoundMark>
|
||||||
|
<CompoundMark CompoundMarkID="2">
|
||||||
|
<Mark Lat="57.670914" Lng="11.835263"/>
|
||||||
|
<Mark Lat="57.6699024" Lng="11.8353195"/>
|
||||||
|
</CompoundMark>
|
||||||
|
<CompoundMark CompoundMarkID="3">
|
||||||
|
<Mark Lat="57.6674596" Lng="11.8417500"/>
|
||||||
|
<Mark Lat="57.667473" Lng="11.84429"/>
|
||||||
|
</CompoundMark>
|
||||||
|
<CompoundMark CompoundMarkID="4">
|
||||||
|
<Mark Lat="57.6657945" Lng="11.8351409"/>
|
||||||
|
<Mark Lat="57.6643158" Lng="11.8352297"/>
|
||||||
|
</CompoundMark>
|
||||||
|
<CompoundMark CompoundMarkID="5">
|
||||||
|
<Mark Lat="57.667311" Lng="11.828857"/>
|
||||||
|
<Mark Lat="57.667334" Lng="11.825853"/>
|
||||||
|
</CompoundMark>
|
||||||
|
</Marks>
|
||||||
|
|
||||||
|
<Course>
|
||||||
|
<OpeningSegment>
|
||||||
|
<Corner CompoundMarkID="1" Rounding="PS"/>
|
||||||
|
<Corner CompoundMarkID="2" Rounding="P"/>
|
||||||
|
</OpeningSegment>
|
||||||
|
|
||||||
|
<RepeatingSegment>
|
||||||
|
<Corner CompoundMarkID="3" Rounding="SP"/>
|
||||||
|
<Corner CompoundMarkID="4" Rounding="PS"/>
|
||||||
|
</RepeatingSegment>
|
||||||
|
|
||||||
|
<ClosingSegment>
|
||||||
|
<Corner CompoundMarkID="5" Rounding="PS"/>
|
||||||
|
</ClosingSegment>
|
||||||
|
</Course>
|
||||||
|
|
||||||
|
<CourseLimit>
|
||||||
|
<Limit Lat="57.672937" Lng="11.836257" />
|
||||||
|
<Limit Lat="57.671239" Lng="11.843078" />
|
||||||
|
<Limit Lat="57.667128" Lng="11.848022" />
|
||||||
|
<Limit Lat="57.664512" Lng="11.844839" />
|
||||||
|
<Limit Lat="57.662515" Lng="11.835569" />
|
||||||
|
<Limit Lat="57.663939" Lng="11.827501" />
|
||||||
|
<Limit Lat="57.667542" Lng="11.822952" />
|
||||||
|
<Limit Lat="57.671123" Lng="11.826858" />
|
||||||
|
</CourseLimit>
|
||||||
|
|
||||||
|
</RaceDefinition>
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import java.net.*?>
|
||||||
|
<?import javafx.scene.*?>
|
||||||
|
<?import com.jfoenix.controls.*?>
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.geometry.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
<?import com.jfoenix.controls.JFXButton?>
|
<?import com.jfoenix.controls.JFXButton?>
|
||||||
<?import java.lang.String?>
|
<?import java.lang.String?>
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
@@ -13,7 +21,7 @@
|
|||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
|
|
||||||
<StackPane fx:id="serverListMainStackPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8.0.112" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.LobbyController">
|
<StackPane fx:id="serverListMainStackPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.LobbyController">
|
||||||
<children>
|
<children>
|
||||||
<GridPane fx:id="serverListMainGridPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
|
<GridPane fx:id="serverListMainGridPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
|
||||||
<children>
|
<children>
|
||||||
@@ -72,29 +80,148 @@
|
|||||||
</GridPane>
|
</GridPane>
|
||||||
<GridPane GridPane.rowIndex="1">
|
<GridPane GridPane.rowIndex="1">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" />
|
<ColumnConstraints hgrow="NEVER" maxWidth="-Infinity" minWidth="-Infinity"
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="400.0" minWidth="400.0" prefWidth="400.0" />
|
prefWidth="115.0"/>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308"
|
||||||
|
minWidth="337.0" prefWidth="430.0"/>
|
||||||
|
<ColumnConstraints hgrow="NEVER" maxWidth="350.0" minWidth="350.0"
|
||||||
|
prefWidth="350.0"/>
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints vgrow="SOMETIMES" />
|
<RowConstraints vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<ScrollPane fx:id="playerListScrollPane" hbarPolicy="NEVER" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
<ScrollPane fx:id="playerListScrollPane" hbarPolicy="NEVER" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
||||||
<content>
|
<content>
|
||||||
<VBox fx:id="playerListVBox" prefHeight="200.0" prefWidth="100.0" />
|
<VBox fx:id="playerListVBox" alignment="TOP_RIGHT" maxWidth="328.0" minWidth="328.0" prefWidth="328.0" />
|
||||||
</content>
|
</content>
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets bottom="15.0" left="7.0" right="15.0" top="15.0" />
|
<Insets bottom="15.0" left="7.0" right="15.0" top="15.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
|
<padding>
|
||||||
|
<Insets right="5.0" />
|
||||||
|
</padding>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
<AnchorPane fx:id="serverMap" style="-fx-background-color: skyblue;">
|
<AnchorPane fx:id="serverMap" style="-fx-background-color: skyblue;" GridPane.columnIndex="1">
|
||||||
<opaqueInsets>
|
<opaqueInsets>
|
||||||
<Insets />
|
<Insets />
|
||||||
</opaqueInsets>
|
</opaqueInsets>
|
||||||
<GridPane.margin>
|
<GridPane.margin>
|
||||||
<Insets bottom="15.0" left="15.0" right="7.0" top="15.0" />
|
<Insets bottom="15.0" left="7.0" right="7.0" top="15.0" />
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
||||||
|
<GridPane prefHeight="370.0" prefWidth="189.0" styleClass="tokenGridView"
|
||||||
|
vgap="5.0">
|
||||||
|
<children>
|
||||||
|
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Tokens"
|
||||||
|
GridPane.halignment="CENTER">
|
||||||
|
<font>
|
||||||
|
<Font name="System Bold" size="18.0"/>
|
||||||
|
</font>
|
||||||
|
</Text>
|
||||||
|
<StackPane prefHeight="150.0" prefWidth="200.0"
|
||||||
|
GridPane.rowIndex="1">
|
||||||
|
<children>
|
||||||
|
<Label alignment="BOTTOM_CENTER" text="Speed"
|
||||||
|
StackPane.alignment="BOTTOM_CENTER">
|
||||||
|
<font>
|
||||||
|
<Font size="12.0"/>
|
||||||
|
</font>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0"/>
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Pane fx:id="speedTokenPane" prefHeight="999.0"
|
||||||
|
prefWidth="200.0" styleClass="tokenView"/>
|
||||||
|
</children>
|
||||||
|
</StackPane>
|
||||||
|
<StackPane prefHeight="150.0" prefWidth="200.0"
|
||||||
|
GridPane.rowIndex="2">
|
||||||
|
<children>
|
||||||
|
<Label alignment="BOTTOM_CENTER" text="Handling"
|
||||||
|
StackPane.alignment="BOTTOM_CENTER">
|
||||||
|
<font>
|
||||||
|
<Font size="12.0"/>
|
||||||
|
</font>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0"/>
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Pane fx:id="handlingTokenPane" prefHeight="999.0"
|
||||||
|
prefWidth="200.0" styleClass="tokenView"/>
|
||||||
|
</children>
|
||||||
|
</StackPane>
|
||||||
|
<StackPane prefHeight="150.0" prefWidth="200.0"
|
||||||
|
GridPane.rowIndex="3">
|
||||||
|
<children>
|
||||||
|
<Label alignment="BOTTOM_CENTER" text="Wind Walker"
|
||||||
|
StackPane.alignment="BOTTOM_CENTER">
|
||||||
|
<font>
|
||||||
|
<Font size="12.0"/>
|
||||||
|
</font>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0"/>
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Pane fx:id="windWalkerTokenPane" prefHeight="999.0"
|
||||||
|
prefWidth="200.0" styleClass="tokenView"/>
|
||||||
|
</children>
|
||||||
|
</StackPane>
|
||||||
|
<StackPane prefHeight="150.0" prefWidth="200.0"
|
||||||
|
GridPane.rowIndex="4">
|
||||||
|
<children>
|
||||||
|
<Label alignment="BOTTOM_CENTER" text="Bumper"
|
||||||
|
StackPane.alignment="BOTTOM_CENTER">
|
||||||
|
<font>
|
||||||
|
<Font size="12.0"/>
|
||||||
|
</font>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0"/>
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Pane fx:id="bumperTokenPane" prefHeight="999.0"
|
||||||
|
prefWidth="200.0" styleClass="tokenView"/>
|
||||||
|
</children>
|
||||||
|
</StackPane>
|
||||||
|
<StackPane prefHeight="150.0" prefWidth="200.0"
|
||||||
|
GridPane.rowIndex="5">
|
||||||
|
<children>
|
||||||
|
<Label alignment="BOTTOM_CENTER" text="Random"
|
||||||
|
StackPane.alignment="BOTTOM_CENTER">
|
||||||
|
<font>
|
||||||
|
<Font size="12.0"/>
|
||||||
|
</font>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="5.0"/>
|
||||||
|
</padding>
|
||||||
|
</Label>
|
||||||
|
<Pane fx:id="randomTokenPane" prefHeight="999.0"
|
||||||
|
prefWidth="60.0" styleClass="tokenView"/>
|
||||||
|
</children>
|
||||||
|
</StackPane>
|
||||||
|
</children>
|
||||||
|
<columnConstraints>
|
||||||
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="80.0"
|
||||||
|
prefWidth="80.0"/>
|
||||||
|
</columnConstraints>
|
||||||
|
<padding>
|
||||||
|
<Insets bottom="15.0" left="15.0" right="7.0" top="15.0"/>
|
||||||
|
</padding>
|
||||||
|
<rowConstraints>
|
||||||
|
<RowConstraints maxHeight="116.0" minHeight="0.0" prefHeight="40.0"
|
||||||
|
vgrow="NEVER"/>
|
||||||
|
<RowConstraints maxHeight="285.0" minHeight="-Infinity"
|
||||||
|
prefHeight="60.0" vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="285.0" minHeight="-Infinity"
|
||||||
|
prefHeight="60.0" vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="141.0" minHeight="-Infinity"
|
||||||
|
prefHeight="60.0" vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="285.0" minHeight="-Infinity"
|
||||||
|
prefHeight="60.0" vgrow="SOMETIMES"/>
|
||||||
|
<RowConstraints maxHeight="285.0" minHeight="-Infinity"
|
||||||
|
prefHeight="60.0" vgrow="SOMETIMES"/>
|
||||||
|
</rowConstraints>
|
||||||
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
@@ -106,10 +233,10 @@
|
|||||||
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="400.0" prefHeight="400.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="400.0" prefHeight="400.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<stylesheets>
|
|
||||||
<String fx:value="/css/Master.css" />
|
|
||||||
<String fx:value="/css/LobbyView.css" />
|
|
||||||
</stylesheets>
|
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
|
<stylesheets>
|
||||||
|
<URL value="@../css/Master.css"/>
|
||||||
|
<URL value="@../css/LobbyView.css"/>
|
||||||
|
</stylesheets>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
|
|||||||
@@ -113,8 +113,8 @@
|
|||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="400.0" prefHeight="459.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="1.7976931348623157E308" minHeight="400.0" prefHeight="429.0" vgrow="SOMETIMES" />
|
||||||
<RowConstraints maxHeight="70.0" minHeight="70.0" prefHeight="70.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="100.0" minHeight="100.0" prefHeight="100.0" vgrow="SOMETIMES" />
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<String fx:value="/css/Master.css" />
|
<String fx:value="/css/Master.css" />
|
||||||
|
|||||||
@@ -1,30 +1,47 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import com.jfoenix.controls.JFXSpinner?>
|
||||||
<?import java.net.URL?>
|
<?import java.net.URL?>
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?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.StackPane?>
|
<?import javafx.scene.layout.StackPane?>
|
||||||
<?import javafx.scene.text.Font?>
|
<StackPane fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
|
||||||
<?import javafx.scene.text.Text?>
|
minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8"
|
||||||
<StackPane id="background" fx:id="rootPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="seng302.visualiser.controllers.SplashScreenController">
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
|
fx:controller="seng302.visualiser.controllers.SplashScreenController">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="296.0" fitWidth="295.0" pickOnBounds="true" preserveRatio="true" StackPane.alignment="TOP_CENTER">
|
<AnchorPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="subHeadLabel" layoutX="225.0" layoutY="370.0"
|
||||||
|
text="MADE BY :PARTYPARROT:"/>
|
||||||
|
<StackPane layoutX="150.0" layoutY="10.0" prefHeight="150.0" prefWidth="200.0">
|
||||||
|
<children>
|
||||||
|
<ImageView fitHeight="190.0" fitWidth="190.0" pickOnBounds="true"
|
||||||
|
preserveRatio="true">
|
||||||
<image>
|
<image>
|
||||||
<Image url="@../PP.png"/>
|
<Image url="@../PP.png"/>
|
||||||
</image>
|
</image>
|
||||||
<StackPane.margin>
|
|
||||||
<Insets top="20.0" />
|
|
||||||
</StackPane.margin>
|
|
||||||
</ImageView>
|
</ImageView>
|
||||||
<Text fx:id="headText" strokeType="OUTSIDE" strokeWidth="0.0" text="Party Parrots at Sea" StackPane.alignment="BOTTOM_CENTER">
|
<JFXSpinner fx:id="materialDesignRed" radius="150.0" startingAngle="0.0"
|
||||||
<font>
|
styleClass="materialDesign-red"/>
|
||||||
<Font name="System Bold" size="42.0" />
|
<JFXSpinner radius="140.0" startingAngle="20.0"
|
||||||
</font>
|
styleClass="materialDesign-orange"/>
|
||||||
<StackPane.margin>
|
<JFXSpinner radius="130.0" startingAngle="40.0"
|
||||||
<Insets bottom="20.0" />
|
styleClass="materialDesign-yellow"/>
|
||||||
</StackPane.margin>
|
<JFXSpinner radius="120.0" startingAngle="60.0"
|
||||||
</Text>
|
styleClass="materialDesign-green"/>
|
||||||
|
<JFXSpinner radius="110.0" startingAngle="80.0" styleClass="materialDesign-cyan"/>
|
||||||
|
<JFXSpinner radius="100.0" startingAngle="100.0"
|
||||||
|
styleClass="materialDesign-blue"/>
|
||||||
|
<JFXSpinner radius="90.0" startingAngle="120.0"
|
||||||
|
styleClass="materialDesign-purple"/>
|
||||||
|
</children>
|
||||||
|
</StackPane>
|
||||||
|
<Label fx:id="headText" layoutX="36.0" layoutY="295.0" text="PARTY PARROT AT SEA"/>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
||||||
</children>
|
</children>
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<URL value="@../css/Master.css"/>
|
<URL value="@../css/Master.css"/>
|
||||||
|
|||||||
@@ -1,5 +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 java.lang.String?>
|
<?import java.lang.String?>
|
||||||
<?import javafx.geometry.Insets?>
|
<?import javafx.geometry.Insets?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
@@ -8,20 +12,17 @@
|
|||||||
<?import javafx.scene.layout.Pane?>
|
<?import javafx.scene.layout.Pane?>
|
||||||
<?import javafx.scene.layout.RowConstraints?>
|
<?import javafx.scene.layout.RowConstraints?>
|
||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<VBox fx:id="playerCellVBox" maxHeight="-Infinity" maxWidth="1.7976931348623157E308"
|
|
||||||
minHeight="-Infinity" minWidth="-Infinity" prefHeight="80.0"
|
<VBox fx:id="playerCellVBox" maxHeight="-Infinity" maxWidth="340.0" minHeight="-Infinity" minWidth="340.0" prefHeight="80.0" prefWidth="340.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1">
|
|
||||||
<stylesheets>
|
<stylesheets>
|
||||||
<String fx:value="/css/Master.css" />
|
<String fx:value="/css/Master.css" />
|
||||||
<String fx:value="/css/cells/PlayerCell.css" />
|
<String fx:value="/css/cells/PlayerCell.css" />
|
||||||
</stylesheets>
|
</stylesheets>
|
||||||
<children>
|
<children>
|
||||||
<GridPane fx:id="playerListCell" maxHeight="-Infinity" maxWidth="1.7976931348623157E308"
|
<GridPane fx:id="playerListCell" maxHeight="-Infinity" maxWidth="1.7976931348623157E308" minHeight="-Infinity" prefHeight="70.0">
|
||||||
minHeight="-Infinity" prefHeight="70.0">
|
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="80.0" prefWidth="80.0" />
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="80.0" minWidth="80.0" prefWidth="80.0" />
|
||||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="290.0" minWidth="290.0"
|
<ColumnConstraints hgrow="SOMETIMES" maxWidth="260.0" minWidth="260.0" prefWidth="260.0" />
|
||||||
prefWidth="290.0"/>
|
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
|
<RowConstraints maxHeight="80.0" minHeight="80.0" prefHeight="80.0" vgrow="SOMETIMES" />
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<GridPane>
|
<GridPane>
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
|
||||||
|
<ColumnConstraints/>
|
||||||
</columnConstraints>
|
</columnConstraints>
|
||||||
<rowConstraints>
|
<rowConstraints>
|
||||||
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="60.0"
|
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="60.0"
|
||||||
@@ -112,7 +113,7 @@
|
|||||||
<Insets/>
|
<Insets/>
|
||||||
</GridPane.margin>
|
</GridPane.margin>
|
||||||
</Label>
|
</Label>
|
||||||
<JFXButton id="ZOOM IN" fx:id="zoomInbtn" buttonType="RAISED"
|
<JFXButton id="ZOOM IN" fx:id="zoomInBtn" buttonType="RAISED"
|
||||||
maxHeight="-Infinity" maxWidth="-Infinity" minHeight="35.0"
|
maxHeight="-Infinity" maxWidth="-Infinity" minHeight="35.0"
|
||||||
minWidth="-Infinity" prefWidth="120.0" text="Z"
|
minWidth="-Infinity" prefWidth="120.0" text="Z"
|
||||||
GridPane.columnIndex="1" GridPane.halignment="CENTER"
|
GridPane.columnIndex="1" GridPane.halignment="CENTER"
|
||||||
@@ -223,8 +224,19 @@
|
|||||||
GridPane.valignment="TOP"/>
|
GridPane.valignment="TOP"/>
|
||||||
<JFXButton fx:id="resetBtn" buttonType="RAISED" maxHeight="-Infinity"
|
<JFXButton fx:id="resetBtn" buttonType="RAISED" maxHeight="-Infinity"
|
||||||
maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="45.0"
|
maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="45.0"
|
||||||
prefWidth="150.0" text="RESET" GridPane.columnSpan="2" GridPane.halignment="CENTER"
|
prefWidth="140.0" text="RESET" GridPane.columnSpan="2" GridPane.halignment="LEFT"
|
||||||
GridPane.rowIndex="2" GridPane.valignment="CENTER"/>
|
GridPane.rowIndex="2" GridPane.valignment="CENTER">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets left="60.0"/>
|
||||||
|
</GridPane.margin>
|
||||||
|
</JFXButton>
|
||||||
|
<JFXButton fx:id="confirmBtn" buttonType="RAISED" maxHeight="-Infinity"
|
||||||
|
maxWidth="-Infinity" minHeight="45.0" minWidth="140.0" prefHeight="45.0"
|
||||||
|
prefWidth="140.0" text="CONFIRM" GridPane.halignment="RIGHT" GridPane.rowIndex="2">
|
||||||
|
<GridPane.margin>
|
||||||
|
<Insets right="60.0"/>
|
||||||
|
</GridPane.margin>
|
||||||
|
</JFXButton>
|
||||||
</children>
|
</children>
|
||||||
</GridPane>
|
</GridPane>
|
||||||
</children>
|
</children>
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import com.jfoenix.controls.*?>
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import java.net.*?>
|
||||||
|
<?import javafx.geometry.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
<?import com.jfoenix.controls.JFXButton?>
|
<?import com.jfoenix.controls.JFXButton?>
|
||||||
<?import com.jfoenix.controls.JFXDialogLayout?>
|
<?import com.jfoenix.controls.JFXDialogLayout?>
|
||||||
<?import java.net.URL?>
|
<?import java.net.URL?>
|
||||||
@@ -9,6 +14,7 @@
|
|||||||
<?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?>
|
||||||
|
|
||||||
<JFXDialogLayout maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
|
<JFXDialogLayout maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity"
|
||||||
minWidth="-Infinity" prefWidth="550.0" xmlns="http://javafx.com/javafx/8"
|
minWidth="-Infinity" prefWidth="550.0" xmlns="http://javafx.com/javafx/8"
|
||||||
xmlns:fx="http://javafx.com/fxml/1"
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
|
|||||||
Reference in New Issue
Block a user