mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
- Fixed JFXDialog initialised in lobby, raceview, serverlist controller by default. Now, dialog only appears when called.
- [WIP] Created keybindingdialog fxml. CSS not yet done. - Removed top most anchorpane on raceview so parent is stackpane like other views. #story[1278]
This commit is contained in:
@@ -90,16 +90,16 @@ public class LobbyController implements Initializable {
|
||||
ViewManager.getInstance().getPlayerList().setAll(ViewManager.getInstance().getPlayerList().sorted());
|
||||
});
|
||||
|
||||
customizeButton.setOnMouseReleased(event -> {
|
||||
customizationDialog = createCustomizeDialog();
|
||||
Sounds.playButtonClick();
|
||||
customizationDialog.show();
|
||||
});
|
||||
|
||||
Platform.runLater(() -> {
|
||||
Integer playerId = ViewManager.getInstance().getGameClient().getServerThread().getClientId();
|
||||
|
||||
playersColor = Colors.getColor(playerId - 1);
|
||||
customizationDialog = createCustomizeDialog();
|
||||
|
||||
customizeButton.setOnMouseReleased(event -> {
|
||||
Sounds.playButtonClick();
|
||||
customizationDialog.show();
|
||||
});
|
||||
});
|
||||
|
||||
leaveLobbyButton.setOnMouseEntered(e -> Sounds.playHoverSound());
|
||||
|
||||
@@ -87,7 +87,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
@FXML
|
||||
private Label timerLabel;
|
||||
@FXML
|
||||
private StackPane contentAnchorPane;
|
||||
private StackPane contentStackPane;
|
||||
|
||||
private GridPane contentGridPane;
|
||||
@FXML
|
||||
@@ -134,8 +134,6 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
Sounds.stopMusic();
|
||||
Sounds.playRaceMusic();
|
||||
|
||||
finishScreenDialog = createFinishDialog();
|
||||
|
||||
// Load a default important annotation state
|
||||
//importantAnnotations = new ImportantAnnotationsState();
|
||||
|
||||
@@ -180,9 +178,10 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
// chatHistory.textProperty().addListener((obs, oldValue, newValue) -> {
|
||||
// chatHistory.setScrollTop(Double.MAX_VALUE);
|
||||
// });
|
||||
rvAnchorPane.setOnMouseClicked((event) ->
|
||||
rvAnchorPane.requestFocus()
|
||||
);
|
||||
|
||||
contentStackPane.setOnMouseClicked(event -> {
|
||||
contentStackPane.requestFocus();
|
||||
});
|
||||
|
||||
//Makes the chat history non transparent when clicked on
|
||||
chatInput.focusedProperty().addListener(new ChangeListener<Boolean>() {
|
||||
@@ -200,26 +199,27 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
|
||||
public void showFinishDialog(ArrayList<ClientYacht> finishedBoats) {
|
||||
raceState.setRaceStarted(false);
|
||||
finishDialogController.setFinishedBoats(finishedBoats);
|
||||
finishScreenDialog.show();
|
||||
createFinishDialog(finishedBoats);
|
||||
}
|
||||
|
||||
private JFXDialog createFinishDialog() {
|
||||
/**
|
||||
* Create finishScreenDialog and set up finishDialogController.
|
||||
*/
|
||||
private void createFinishDialog(ArrayList<ClientYacht> finishedBoats) {
|
||||
FXMLLoader dialog = new FXMLLoader(
|
||||
getClass().getResource("/views/dialogs/RaceFinishDialog.fxml"));
|
||||
|
||||
JFXDialog finishScreenDialog = null;
|
||||
|
||||
try {
|
||||
finishScreenDialog = new JFXDialog(contentAnchorPane, dialog.load(),
|
||||
JFXDialog.DialogTransition.CENTER);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
finishDialogController = dialog.getController();
|
||||
|
||||
return finishScreenDialog;
|
||||
Platform.runLater(() -> {
|
||||
try {
|
||||
finishScreenDialog = new JFXDialog(contentStackPane, dialog.load(),
|
||||
JFXDialog.DialogTransition.CENTER);
|
||||
finishDialogController = dialog.getController();
|
||||
finishDialogController.setFinishedBoats(finishedBoats);
|
||||
finishScreenDialog.show();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public void loadRace (
|
||||
@@ -245,7 +245,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
gameView = new GameView3D();
|
||||
// gameView.setFrameRateFXText(fpsDisplay);
|
||||
Platform.runLater(() -> {
|
||||
contentAnchorPane.getChildren().add(0, gameView.getAssets());
|
||||
contentStackPane.getChildren().add(0, gameView.getAssets());
|
||||
((SubScene) gameView.getAssets()).widthProperty()
|
||||
.bind(ViewManager.getInstance().getStage().widthProperty());
|
||||
((SubScene) gameView.getAssets()).heightProperty()
|
||||
@@ -805,7 +805,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
||||
public String readChatInput() {
|
||||
String chat = chatInput.getText();
|
||||
chatInput.clear();
|
||||
rvAnchorPane.requestFocus();
|
||||
contentStackPane.requestFocus();
|
||||
return chat;
|
||||
}
|
||||
|
||||
|
||||
@@ -112,16 +112,23 @@ public class ServerListController implements Initializable, ServerListenerDelega
|
||||
serverListVBox.getChildren().add(noServersFound);
|
||||
|
||||
// Set up dialog for server creation
|
||||
serverListHostButton.setOnAction(action -> {
|
||||
showServerCreationDialog();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows Server Creation Dialog when "Host" button is clicked.
|
||||
*/
|
||||
private void showServerCreationDialog() {
|
||||
Platform.runLater(() -> {
|
||||
FXMLLoader dialogContent = new FXMLLoader(getClass().getResource(
|
||||
"/views/dialogs/ServerCreationDialog.fxml"));
|
||||
try {
|
||||
JFXDialog dialog = new JFXDialog(serverListMainStackPane, dialogContent.load(),
|
||||
DialogTransition.CENTER);
|
||||
serverListHostButton.setOnAction(action -> {
|
||||
dialog.show();
|
||||
Sounds.playButtonClick();
|
||||
});
|
||||
dialog.show();
|
||||
Sounds.playButtonClick();
|
||||
} catch (IOException e) {
|
||||
logger.warn("Could not create Server Creation Dialog.");
|
||||
}
|
||||
|
||||
@@ -2,11 +2,17 @@ package seng302.visualiser.controllers;
|
||||
|
||||
import com.jfoenix.controls.JFXButton;
|
||||
import com.jfoenix.controls.JFXDecorator;
|
||||
import com.jfoenix.controls.JFXDialog;
|
||||
import com.jfoenix.controls.JFXDialog.DialogTransition;
|
||||
import com.jfoenix.controls.events.JFXDialogEvent;
|
||||
import com.jfoenix.svg.SVGGlyph;
|
||||
import com.sun.org.apache.xpath.internal.operations.Bool;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import javafx.application.Platform;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.event.ActionEvent;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Cursor;
|
||||
import javafx.scene.Node;
|
||||
@@ -14,7 +20,10 @@ import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.SceneAntialiasing;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.layout.StackPane;
|
||||
import javafx.scene.paint.Color;
|
||||
import javafx.stage.Stage;
|
||||
import org.slf4j.Logger;
|
||||
@@ -32,11 +41,6 @@ public class ViewManager {
|
||||
private HashMap<String, String> properties; //TODO is this the best way to do this??
|
||||
private ObservableList<String> playerList;
|
||||
private Logger logger = LoggerFactory.getLogger(ViewManager.class);
|
||||
|
||||
public Stage getStage() {
|
||||
return stage;
|
||||
}
|
||||
|
||||
private Stage stage;
|
||||
|
||||
private ViewManager() {
|
||||
@@ -119,6 +123,23 @@ public class ViewManager {
|
||||
//Get the button box
|
||||
HBox btns = (HBox) decorator.getChildren().get(0);
|
||||
|
||||
//Create settings button -- [WIP]
|
||||
JFXButton btnSettings = new JFXButton();
|
||||
btnSettings.setText(" Key Bindings");
|
||||
btnSettings.setStyle("-fx-text-fill:#fff");
|
||||
btnSettings.getStyleClass().add("jfx-decorator-button");
|
||||
btnSettings.setCursor(Cursor.HAND);
|
||||
|
||||
btnSettings.setOnMouseClicked(event -> Platform.runLater(() -> {
|
||||
try {
|
||||
if (!checkDialogOpened(decorator.getChildren())) {
|
||||
showKeyBindingDialog();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
logger.warn("Could not create Key Binding Dialog.");
|
||||
}
|
||||
}));
|
||||
|
||||
//Create new button
|
||||
JFXButton btnMute = new JFXButton();
|
||||
btnMute.setText(" Toggle Sound");
|
||||
@@ -134,9 +155,13 @@ public class ViewManager {
|
||||
SVGGlyph volumeOff = new SVGGlyph(0, "VOLUME_ON",
|
||||
"M13.5,9 C13.5,7.2 12.5,5.7 11,5 L11,7.2 L13.5,9.7 L13.5,9 L13.5,9 Z M16,9 C16,9.9 15.8,10.8 15.5,11.6 L17,13.1 C17.7,11.9 18,10.4 18,8.9 C18,4.6 15,1 11,0.1 L11,2.2 C13.9,3.2 16,5.8 16,9 L16,9 Z M1.3,0 L0,1.3 L4.7,6 L0,6 L0,12 L4,12 L9,17 L9,10.3 L13.3,14.6 C12.6,15.1 11.9,15.5 11,15.8 L11,17.9 C12.4,17.6 13.6,17 14.7,16.1 L16.7,18.1 L18,16.8 L9,7.8 L1.3,0 L1.3,0 Z M9,1 L6.9,3.1 L9,5.2 L9,1 L9,1 Z",
|
||||
Color.WHITE);
|
||||
SVGGlyph keyBindingGlyph = new SVGGlyph(0, "KEY_BINDING",
|
||||
"M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z",
|
||||
Color.WHITE);
|
||||
volumeOn.setSize(16, 16);
|
||||
volumeOff.setSize(16, 16);
|
||||
spacer.setSize(40, 16);
|
||||
keyBindingGlyph.setSize(16,16);
|
||||
|
||||
// Determine which graphic should go on the button
|
||||
if (Sounds.isMusicMuted() && Sounds.isSoundEffectsMuted()) {
|
||||
@@ -145,9 +170,12 @@ public class ViewManager {
|
||||
btnMute.setGraphic(volumeOn);
|
||||
}
|
||||
|
||||
btnSettings.setGraphic(keyBindingGlyph);
|
||||
|
||||
// Add Buttons
|
||||
btns.getChildren().add(0, spacer);
|
||||
btns.getChildren().add(0, btnMute);
|
||||
btns.getChildren().add(0, btnSettings);
|
||||
btnMute.setOnAction((action) -> {
|
||||
Sounds.toggleAllSounds();
|
||||
if (btnMute.getGraphic().equals(volumeOff)) {
|
||||
@@ -159,6 +187,31 @@ public class ViewManager {
|
||||
|
||||
}
|
||||
|
||||
private Boolean checkDialogOpened(ObservableList<Node> nodes) {
|
||||
for (Node node : nodes) {
|
||||
if (node instanceof JFXDialog) {
|
||||
return true;
|
||||
} else if (node instanceof StackPane) {
|
||||
return checkDialogOpened(((StackPane) node).getChildren());
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private void showKeyBindingDialog() throws IOException {
|
||||
FXMLLoader dialogContent = new FXMLLoader(getClass().getResource(
|
||||
"/views/dialogs/KeyBindingDialog.fxml"));
|
||||
for (Node node : decorator.getChildren()) {
|
||||
if (node instanceof StackPane) {
|
||||
JFXDialog dialog = new JFXDialog((StackPane) node,
|
||||
dialogContent.load(),
|
||||
DialogTransition.CENTER);
|
||||
dialog.show();
|
||||
Sounds.playButtonClick();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if a PC has compatibility with the bonjour protocol for server detection.
|
||||
*/
|
||||
@@ -221,6 +274,7 @@ public class ViewManager {
|
||||
|
||||
/**
|
||||
* Change the view to the Lobby Screen
|
||||
*
|
||||
* @param disableReadyButton Boolean value so that clients can't try start a game.
|
||||
* @return A LobbyController object for the Lobby Screen.
|
||||
*/
|
||||
@@ -243,6 +297,7 @@ public class ViewManager {
|
||||
|
||||
/**
|
||||
* Sets up the view for the race. Creating a new decorator and destroying the old one.
|
||||
*
|
||||
* @return A RaceViewController for the race view screen.
|
||||
*/
|
||||
|
||||
@@ -286,7 +341,7 @@ public class ViewManager {
|
||||
}
|
||||
});
|
||||
|
||||
while (loader.getController() == null){
|
||||
while (loader.getController() == null) {
|
||||
try {
|
||||
Thread.sleep(50);
|
||||
} catch (InterruptedException e) {
|
||||
@@ -296,4 +351,8 @@ public class ViewManager {
|
||||
|
||||
return loader.getController();
|
||||
}
|
||||
|
||||
public Stage getStage() {
|
||||
return stage;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,234 +14,232 @@
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.layout.StackPane?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<AnchorPane fx:id="rvAnchorPane" maxHeight="1.7976931348623157E308"
|
||||
maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0"
|
||||
prefWidth="1200.0" style="-fx-background-color: skyblue;" xmlns="http://javafx.com/javafx/8"
|
||||
<StackPane fx:id="contentStackPane" maxHeight="1.7976931348623157E308"
|
||||
maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity"
|
||||
prefHeight="800.0" prefWidth="1200.0"
|
||||
style="-fx-background-color: skyblue;" xmlns="http://javafx.com/javafx/8"
|
||||
xmlns:fx="http://javafx.com/fxml/1"
|
||||
fx:controller="seng302.visualiser.controllers.RaceViewController">
|
||||
<children>
|
||||
<StackPane fx:id="contentAnchorPane" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="800.0" prefWidth="1200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
prefHeight="800.0" prefWidth="1200.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="250.0" minWidth="250.0"
|
||||
prefWidth="250.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="400.0"
|
||||
prefWidth="400.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="70.0" minHeight="70.0" prefHeight="70.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="1.7976931348623157E308" vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="250.0" minHeight="250.0" prefHeight="250.0"
|
||||
valignment="BOTTOM" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane id="timerGrid" fx:id="timerGrid" prefWidth="192.0"
|
||||
styleClass="timer">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0"
|
||||
prefWidth="50.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="135.0"
|
||||
minWidth="135.0" prefWidth="135.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets left="10.0" right="200.0" top="10.0"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<ImageView fitHeight="40.0" fitWidth="40.0" pickOnBounds="true"
|
||||
preserveRatio="true" GridPane.halignment="CENTER"
|
||||
GridPane.valignment="CENTER">
|
||||
<image>
|
||||
<Image url="@../images/timer.png"/>
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets/>
|
||||
</GridPane.margin>
|
||||
</ImageView>
|
||||
<Label fx:id="timerLabel" text="00:03:34" GridPane.columnIndex="1"
|
||||
GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
||||
<font>
|
||||
<Font size="21.0"/>
|
||||
</font>
|
||||
<GridPane.margin>
|
||||
<Insets/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.columnIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||
prefWidth="100.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||
prefWidth="100.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
</GridPane>
|
||||
<GridPane fx:id="chatGridPane" GridPane.columnIndex="2"
|
||||
GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="390.0"
|
||||
minWidth="390.0" prefWidth="390.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="1.7976931348623157E308"
|
||||
vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Pane fx:id="chatHistoryHolder" prefHeight="200.0" prefWidth="200.0"
|
||||
GridPane.hgrow="ALWAYS" GridPane.valignment="BOTTOM"
|
||||
GridPane.vgrow="ALWAYS">
|
||||
<GridPane.margin>
|
||||
<Insets/>
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
</Pane>
|
||||
<GridPane fx:id="chatInputHolder" GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||
prefWidth="100.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity"
|
||||
minWidth="90.0" prefWidth="90.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="50.0" minHeight="50.0"
|
||||
prefHeight="50.0" valignment="CENTER" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<JFXButton fx:id="chatSend" alignment="CENTER"
|
||||
buttonType="RAISED" maxHeight="-Infinity"
|
||||
maxWidth="1.7976931348623157E308" minHeight="-Infinity"
|
||||
minWidth="-Infinity" prefHeight="35.0" text="SEND"
|
||||
GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0"
|
||||
top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</JFXButton>
|
||||
<JFXTextField fx:id="chatInput" maxHeight="35.0"
|
||||
minHeight="-Infinity" prefHeight="35.0">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="20.0" right="10.0"/>
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets right="15.0"/>
|
||||
</padding>
|
||||
</JFXTextField>
|
||||
</children>
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</GridPane>
|
||||
</children>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" right="10.0"/>
|
||||
</GridPane.margin>
|
||||
</GridPane>
|
||||
<GridPane fx:id="windGridPane" maxHeight="-Infinity" maxWidth="-Infinity"
|
||||
prefHeight="150.0" prefWidth="240.0" GridPane.halignment="CENTER"
|
||||
GridPane.rowIndex="2" GridPane.valignment="BOTTOM">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0"
|
||||
minWidth="110.0" prefWidth="110.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="132.0" minWidth="10.0"
|
||||
prefWidth="132.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="120.0" minHeight="120.0"
|
||||
prefHeight="120.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="30.0" minHeight="30.0" prefHeight="30.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label fx:id="positionLabel" text="Position:"
|
||||
GridPane.columnIndex="1" GridPane.halignment="LEFT"
|
||||
GridPane.rowSpan="2" GridPane.valignment="TOP">
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<Label fx:id="boatSpeedLabel" text="Boat Speed:"
|
||||
GridPane.columnIndex="1" GridPane.halignment="LEFT"
|
||||
GridPane.rowSpan="2" GridPane.valignment="CENTER">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<Label fx:id="boatHeadingLabel" text="Boat Heading:"
|
||||
GridPane.columnIndex="1" GridPane.halignment="LEFT"
|
||||
GridPane.rowSpan="2" GridPane.valignment="BOTTOM">
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<GridPane fx:id="windHolder" GridPane.rowSpan="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||
prefWidth="100.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="120.0" minHeight="120.0"
|
||||
prefHeight="120.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="30.0" minHeight="30.0"
|
||||
prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<ImageView fx:id="windImageView" fitHeight="92.0"
|
||||
fitWidth="109.0" pickOnBounds="true" preserveRatio="true"
|
||||
GridPane.halignment="CENTER" GridPane.rowSpan="2"
|
||||
GridPane.valignment="CENTER"/>
|
||||
<Label fx:id="windSpeedLabel" text="0.0 Knots"
|
||||
GridPane.halignment="RIGHT" GridPane.rowIndex="1"
|
||||
GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets right="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<Label fx:id="windDirectionLabel" text="180.0°"
|
||||
GridPane.halignment="LEFT" GridPane.rowIndex="1"
|
||||
GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets left="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" top="40.0"/>
|
||||
</GridPane.margin>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
</StackPane>
|
||||
</children>
|
||||
<children>
|
||||
<GridPane maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308"
|
||||
prefHeight="800.0" prefWidth="1200.0">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="250.0" minWidth="250.0"
|
||||
prefWidth="250.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="400.0"
|
||||
prefWidth="400.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="70.0" minHeight="70.0" prefHeight="70.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="1.7976931348623157E308" vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="250.0" minHeight="250.0" prefHeight="250.0"
|
||||
valignment="BOTTOM" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane id="timerGrid" fx:id="timerGrid" prefWidth="192.0"
|
||||
styleClass="timer">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="50.0" minWidth="50.0"
|
||||
prefWidth="50.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="135.0"
|
||||
minWidth="135.0" prefWidth="135.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets left="10.0" right="200.0" top="10.0"/>
|
||||
</GridPane.margin>
|
||||
<children>
|
||||
<ImageView fitHeight="40.0" fitWidth="40.0" pickOnBounds="true"
|
||||
preserveRatio="true" GridPane.halignment="CENTER"
|
||||
GridPane.valignment="CENTER">
|
||||
<image>
|
||||
<Image url="@../images/timer.png"/>
|
||||
</image>
|
||||
<GridPane.margin>
|
||||
<Insets/>
|
||||
</GridPane.margin>
|
||||
</ImageView>
|
||||
<Label fx:id="timerLabel" text="00:03:34" GridPane.columnIndex="1"
|
||||
GridPane.halignment="CENTER" GridPane.valignment="CENTER">
|
||||
<font>
|
||||
<Font size="21.0"/>
|
||||
</font>
|
||||
<GridPane.margin>
|
||||
<Insets/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
</children>
|
||||
</GridPane>
|
||||
<GridPane GridPane.columnIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||
prefWidth="100.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||
prefWidth="100.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
</GridPane>
|
||||
<GridPane fx:id="chatGridPane" GridPane.columnIndex="2"
|
||||
GridPane.rowIndex="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="390.0"
|
||||
minWidth="390.0" prefWidth="390.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="1.7976931348623157E308"
|
||||
vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Pane fx:id="chatHistoryHolder" prefHeight="200.0" prefWidth="200.0"
|
||||
GridPane.hgrow="ALWAYS" GridPane.valignment="BOTTOM"
|
||||
GridPane.vgrow="ALWAYS">
|
||||
<GridPane.margin>
|
||||
<Insets/>
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0"/>
|
||||
</padding>
|
||||
</Pane>
|
||||
<GridPane fx:id="chatInputHolder" GridPane.rowIndex="1">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||
prefWidth="100.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity"
|
||||
minWidth="90.0" prefWidth="90.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="50.0" minHeight="50.0"
|
||||
prefHeight="50.0" valignment="CENTER" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<JFXButton fx:id="chatSend" alignment="CENTER"
|
||||
buttonType="RAISED" maxHeight="-Infinity"
|
||||
maxWidth="1.7976931348623157E308" minHeight="-Infinity"
|
||||
minWidth="-Infinity" prefHeight="35.0" text="SEND"
|
||||
GridPane.columnIndex="1">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0"
|
||||
top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</JFXButton>
|
||||
<JFXTextField fx:id="chatInput" maxHeight="35.0"
|
||||
minHeight="-Infinity" prefHeight="35.0">
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="20.0" right="10.0"/>
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets right="15.0"/>
|
||||
</padding>
|
||||
</JFXTextField>
|
||||
</children>
|
||||
<GridPane.margin>
|
||||
<Insets top="10.0"/>
|
||||
</GridPane.margin>
|
||||
</GridPane>
|
||||
</children>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" right="10.0"/>
|
||||
</GridPane.margin>
|
||||
</GridPane>
|
||||
<GridPane fx:id="windGridPane" maxHeight="-Infinity" maxWidth="-Infinity"
|
||||
prefHeight="150.0" prefWidth="240.0" GridPane.halignment="CENTER"
|
||||
GridPane.rowIndex="2" GridPane.valignment="BOTTOM">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="110.0"
|
||||
minWidth="110.0" prefWidth="110.0"/>
|
||||
<ColumnConstraints hgrow="SOMETIMES" maxWidth="132.0"
|
||||
minWidth="10.0"
|
||||
prefWidth="132.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="120.0" minHeight="120.0"
|
||||
prefHeight="120.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="30.0" minHeight="30.0" prefHeight="30.0"
|
||||
vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label fx:id="positionLabel" text="Position:"
|
||||
GridPane.columnIndex="1" GridPane.halignment="LEFT"
|
||||
GridPane.rowSpan="2" GridPane.valignment="TOP">
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<Label fx:id="boatSpeedLabel" text="Boat Speed:"
|
||||
GridPane.columnIndex="1" GridPane.halignment="LEFT"
|
||||
GridPane.rowSpan="2" GridPane.valignment="CENTER">
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<Label fx:id="boatHeadingLabel" text="Boat Heading:"
|
||||
GridPane.columnIndex="1" GridPane.halignment="LEFT"
|
||||
GridPane.rowSpan="2" GridPane.valignment="BOTTOM">
|
||||
<padding>
|
||||
<Insets bottom="5.0" left="10.0" right="5.0" top="5.0"/>
|
||||
</padding>
|
||||
</Label>
|
||||
<GridPane fx:id="windHolder" GridPane.rowSpan="2">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0"
|
||||
prefWidth="100.0"/>
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="120.0" minHeight="120.0"
|
||||
prefHeight="120.0" vgrow="SOMETIMES"/>
|
||||
<RowConstraints maxHeight="30.0" minHeight="30.0"
|
||||
prefHeight="30.0" vgrow="SOMETIMES"/>
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<ImageView fx:id="windImageView" fitHeight="92.0"
|
||||
fitWidth="109.0" pickOnBounds="true" preserveRatio="true"
|
||||
GridPane.halignment="CENTER" GridPane.rowSpan="2"
|
||||
GridPane.valignment="CENTER"/>
|
||||
<Label fx:id="windSpeedLabel" text="0.0 Knots"
|
||||
GridPane.halignment="RIGHT" GridPane.rowIndex="1"
|
||||
GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets right="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
<Label fx:id="windDirectionLabel" text="180.0°"
|
||||
GridPane.halignment="LEFT" GridPane.rowIndex="1"
|
||||
GridPane.valignment="CENTER">
|
||||
<GridPane.margin>
|
||||
<Insets left="5.0"/>
|
||||
</GridPane.margin>
|
||||
</Label>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
<opaqueInsets>
|
||||
<Insets/>
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets bottom="10.0" left="10.0" top="40.0"/>
|
||||
</GridPane.margin>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
<stylesheets>
|
||||
<String fx:value="/css/Master.css" />
|
||||
<String fx:value="/css/RaceView.css" />
|
||||
<String fx:value="/css/Master.css"/>
|
||||
<String fx:value="/css/RaceView.css"/>
|
||||
</stylesheets>
|
||||
</AnchorPane>
|
||||
</StackPane>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import java.net.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import com.jfoenix.controls.*?>
|
||||
<?import java.lang.*?>
|
||||
|
||||
<JFXDialogLayout maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="550.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<GridPane>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="90.0" minHeight="90.0" prefHeight="90.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="60.0" minHeight="60.0" prefHeight="60.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<Label text="Custom Keybind" GridPane.columnSpan="2" GridPane.halignment="CENTER" GridPane.valignment="CENTER" />
|
||||
<Label text="Zoom in" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
|
||||
<Label text="Zoom out" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER" />
|
||||
<Label text="VMG" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER" />
|
||||
<Label text="Sails in/out" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER" />
|
||||
<Label text="Tack/Gybe" GridPane.halignment="CENTER" GridPane.rowIndex="5" GridPane.valignment="CENTER" />
|
||||
<Label text="Upwind" GridPane.halignment="CENTER" GridPane.rowIndex="6" GridPane.valignment="CENTER" />
|
||||
<Label text="Downwind" GridPane.halignment="CENTER" GridPane.rowIndex="7" GridPane.valignment="CENTER" />
|
||||
<JFXButton buttonType="RAISED" text="Z" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="1" GridPane.valignment="CENTER" />
|
||||
<JFXButton buttonType="RAISED" text="X" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="2" GridPane.valignment="CENTER" />
|
||||
<JFXButton buttonType="RAISED" text="SPACE" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="3" GridPane.valignment="CENTER" />
|
||||
<JFXButton buttonType="RAISED" text="SHIFT" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="4" GridPane.valignment="CENTER" />
|
||||
<JFXButton buttonType="RAISED" text="ENTER" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="5" GridPane.valignment="CENTER" />
|
||||
<JFXButton buttonType="RAISED" text="PAGE_UP" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="6" GridPane.valignment="CENTER" />
|
||||
<JFXButton buttonType="RAISED" text="PAGE_DOWN" GridPane.columnIndex="1" GridPane.halignment="CENTER" GridPane.rowIndex="7" GridPane.valignment="CENTER" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</children>
|
||||
<stylesheets>
|
||||
<URL value="@../../css/dialogs/KeyBindingDialog.css" />
|
||||
<URL value="@../../css/Master.css" />
|
||||
</stylesheets>
|
||||
</JFXDialogLayout>
|
||||
Reference in New Issue
Block a user