mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
Merge remote-tracking branch 'origin/develop' into wind_arrow
# Conflicts: # src/main/resources/css/RaceView.css # src/main/resources/views/RaceView.fxml
This commit is contained in:
@@ -69,7 +69,7 @@ public class GameState implements Runnable {
|
||||
|
||||
//Collision constants
|
||||
private static final Double MARK_COLLISION_DISTANCE = 15d;
|
||||
public static final Double YACHT_COLLISION_DISTANCE = 25.0;
|
||||
public static final Double YACHT_COLLISION_DISTANCE = 15.0;
|
||||
private static final Double BOUNCE_DISTANCE_MARK = 20.0;
|
||||
public static final Double BOUNCE_DISTANCE_YACHT = 30.0;
|
||||
private static final Double COLLISION_VELOCITY_PENALTY = 0.3;
|
||||
|
||||
@@ -55,6 +55,8 @@ public class RaceViewController extends Thread {
|
||||
@FXML
|
||||
private Pane chatHistoryHolder;
|
||||
@FXML
|
||||
private JFXButton chatToggleButton;
|
||||
@FXML
|
||||
private TextField chatInput;
|
||||
@FXML
|
||||
private Label timerLabel;
|
||||
@@ -112,6 +114,8 @@ public class RaceViewController extends Thread {
|
||||
public void initialize() {
|
||||
miniMapPane.setVisible(false);
|
||||
miniMapButton.setVisible(false);
|
||||
chatHistoryHolder.setVisible(false);
|
||||
chatToggleButton.setVisible(false);
|
||||
contentStackPane.setVisible(false);
|
||||
Image loadingImage = new Image("PP.png");
|
||||
loadingScreen.setImage(loadingImage);
|
||||
@@ -147,6 +151,9 @@ public class RaceViewController extends Thread {
|
||||
chatHistoryHolder.heightProperty()
|
||||
);
|
||||
|
||||
contentStackPane.getChildren().remove(chatToggleButton);
|
||||
contentStackPane.getChildren().add(chatToggleButton);
|
||||
|
||||
contentStackPane.setOnMouseClicked(event -> {
|
||||
contentStackPane.requestFocus();
|
||||
});
|
||||
@@ -197,6 +204,9 @@ public class RaceViewController extends Thread {
|
||||
contentStackPane.setVisible(true);
|
||||
miniMapPane.setVisible(true);
|
||||
miniMapButton.setVisible(true);
|
||||
chatHistoryHolder.setVisible(true);
|
||||
chatToggleButton.setVisible(true);
|
||||
|
||||
Platform.runLater(() -> contentStackPane.requestFocus());
|
||||
}
|
||||
|
||||
@@ -248,6 +258,16 @@ public class RaceViewController extends Thread {
|
||||
}
|
||||
});
|
||||
|
||||
chatToggleButton.setOnMouseClicked((event) -> {
|
||||
if (chatHistoryHolder.visibleProperty().get()) {
|
||||
chatHistoryHolder.setVisible(false);
|
||||
chatToggleButton.setText("+");
|
||||
} else {
|
||||
chatHistoryHolder.setVisible(true);
|
||||
chatToggleButton.setText("—");
|
||||
}
|
||||
});
|
||||
|
||||
Platform.runLater(() -> {
|
||||
contentStackPane.getChildren().add(0, gameView.getAssets());
|
||||
((SubScene) gameView.getAssets()).widthProperty()
|
||||
|
||||
@@ -6,10 +6,16 @@ import com.jfoenix.controls.JFXDialog;
|
||||
import com.jfoenix.controls.JFXDialog.DialogTransition;
|
||||
import com.jfoenix.controls.JFXSnackbar;
|
||||
import com.jfoenix.svg.SVGGlyph;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import javafx.application.Platform;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.*;
|
||||
import javafx.scene.Cursor;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.SceneAntialiasing;
|
||||
import javafx.scene.image.Image;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.StackPane;
|
||||
@@ -24,9 +30,6 @@ import seng302.visualiser.GameClient;
|
||||
import seng302.visualiser.controllers.dialogs.KeyBindingDialogController;
|
||||
import seng302.visualiser.controllers.dialogs.PopupDialogController;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class ViewManager {
|
||||
|
||||
private static ViewManager instance;
|
||||
@@ -376,8 +379,8 @@ public class ViewManager {
|
||||
scene.setOnKeyPressed(gameClient::keyPressed);
|
||||
scene.setOnKeyReleased(gameClient::keyReleased);
|
||||
|
||||
stage.setMinHeight(500);
|
||||
stage.setMinWidth(800);
|
||||
stage.setMinHeight(800);
|
||||
stage.setMinWidth(1200);
|
||||
stage.setTitle("Party Parrots At Sea");
|
||||
stage.getIcons().add(new Image(getClass().getResourceAsStream("/PP.png")));
|
||||
stage.setOnCloseRequest(e -> closeAll());
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#timerGrid{
|
||||
-fx-background-color: rgba(255, 255, 255, 0.6);
|
||||
-fx-effect: -fx-pp-dropshadow-light;
|
||||
-fx-background-radius: 5;
|
||||
}
|
||||
|
||||
GridPane .timer * {
|
||||
@@ -27,20 +28,24 @@ GridPane .timer * {
|
||||
#chatHistoryHolder {
|
||||
-fx-background-color: rgba(255, 255, 255, 0.6);
|
||||
-fx-effect: -fx-pp-dropshadow-light;
|
||||
-fx-background-radius: 5;
|
||||
}
|
||||
|
||||
#chatInputHolder {
|
||||
-fx-background-color: rgba(255, 255, 255, 0.6);
|
||||
-fx-effect: -fx-pp-dropshadow-light;
|
||||
-fx-background-radius: 5;
|
||||
}
|
||||
|
||||
#windGridPane {
|
||||
-fx-background-color: rgba(255, 255, 255, 0.6);
|
||||
-fx-effect: -fx-pp-dropshadow-light;
|
||||
-fx-background-radius: 5;
|
||||
}
|
||||
|
||||
#windHolder {
|
||||
-fx-background-color: rgba(255, 255, 255, 0.5);
|
||||
-fx-background-radius: 5;
|
||||
}
|
||||
|
||||
#chatSend {
|
||||
@@ -61,6 +66,18 @@ GridPane .timer * {
|
||||
-fx-background-color: transparent;
|
||||
}
|
||||
|
||||
/*#windImageView {*/
|
||||
/*-fx-image: url("/images/wind-180.png");*/
|
||||
/*}*/
|
||||
#windImageView {
|
||||
-fx-image: url("/images/wind-180.png");
|
||||
}
|
||||
|
||||
#miniMapPane {
|
||||
-fx-background-color: rgba(255, 255, 255, 0.6);
|
||||
-fx-background-radius: 5;
|
||||
}
|
||||
|
||||
#miniMapButton {
|
||||
-fx-background-color: rgba(255, 255, 255, 0.6);
|
||||
-fx-background-radius: 5;
|
||||
-fx-min-width: 30;
|
||||
-fx-min-height: 30;
|
||||
}
|
||||
@@ -2,18 +2,21 @@
|
||||
|
||||
<?import com.jfoenix.controls.*?>
|
||||
<?import java.lang.*?>
|
||||
<?import java.net.*?>
|
||||
<?import javafx.geometry.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.text.*?>
|
||||
<?import com.jfoenix.controls.JFXButton?>
|
||||
<?import com.jfoenix.controls.JFXSpinner?>
|
||||
<?import com.jfoenix.controls.JFXTextField?>
|
||||
<?import java.lang.String?>
|
||||
<?import java.net.URL?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
@@ -295,7 +298,7 @@
|
||||
<Insets right="15.0" top="15.0" />
|
||||
</StackPane.margin>
|
||||
</Pane>
|
||||
<JFXButton fx:id="miniMapButton" style="-fx-background-color: white; -fx-opacity: 0.45; -fx-background-radius: 10;" text="—" StackPane.alignment="TOP_RIGHT">
|
||||
<JFXButton fx:id="miniMapButton" text="—" StackPane.alignment="TOP_RIGHT">
|
||||
<font>
|
||||
<Font size="15.0" />
|
||||
</font>
|
||||
@@ -307,9 +310,17 @@
|
||||
<ImageView fx:id="loadingScreen" fitHeight="672.0" fitWidth="1200.0" pickOnBounds="true" preserveRatio="true" />
|
||||
<JFXSpinner layoutX="566.0" layoutY="692.0" radius="30.0" />
|
||||
</AnchorPane>
|
||||
<JFXButton fx:id="chatToggleButton" text="—" StackPane.alignment="BOTTOM_RIGHT">
|
||||
<font>
|
||||
<Font size="15.0"/>
|
||||
</font>
|
||||
<StackPane.margin>
|
||||
<Insets bottom="70.0" right="10.0"/>
|
||||
</StackPane.margin>
|
||||
</JFXButton>
|
||||
</children>
|
||||
<stylesheets>
|
||||
<String fx:value="/css/Master.css" />
|
||||
<String fx:value="/css/RaceView.css" />
|
||||
<URL value="@../css/Master.css"/>
|
||||
<URL value="@../css/RaceView.css"/>
|
||||
</stylesheets>
|
||||
</StackPane>
|
||||
|
||||
Reference in New Issue
Block a user