mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 06:18:44 +00:00
changed name: contentanchorpane to contentgridpane
#story[1248]
This commit is contained in:
@@ -27,7 +27,6 @@ import javafx.scene.control.CheckBox;
|
|||||||
import javafx.scene.control.ComboBox;
|
import javafx.scene.control.ComboBox;
|
||||||
import javafx.scene.control.Slider;
|
import javafx.scene.control.Slider;
|
||||||
import javafx.scene.control.TextField;
|
import javafx.scene.control.TextField;
|
||||||
import javafx.scene.layout.AnchorPane;
|
|
||||||
import javafx.scene.layout.GridPane;
|
import javafx.scene.layout.GridPane;
|
||||||
import javafx.scene.layout.Pane;
|
import javafx.scene.layout.Pane;
|
||||||
import javafx.scene.layout.VBox;
|
import javafx.scene.layout.VBox;
|
||||||
@@ -44,7 +43,6 @@ import seng302.model.RaceState;
|
|||||||
import seng302.model.mark.CompoundMark;
|
import seng302.model.mark.CompoundMark;
|
||||||
import seng302.model.mark.Mark;
|
import seng302.model.mark.Mark;
|
||||||
import seng302.model.stream.xml.parser.RaceXMLData;
|
import seng302.model.stream.xml.parser.RaceXMLData;
|
||||||
import seng302.model.token.Token;
|
|
||||||
import seng302.utilities.Sounds;
|
import seng302.utilities.Sounds;
|
||||||
import seng302.visualiser.GameView;
|
import seng302.visualiser.GameView;
|
||||||
import seng302.visualiser.controllers.annotations.Annotation;
|
import seng302.visualiser.controllers.annotations.Annotation;
|
||||||
@@ -80,7 +78,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
@FXML
|
@FXML
|
||||||
private Text timerLabel;
|
private Text timerLabel;
|
||||||
@FXML
|
@FXML
|
||||||
private GridPane contentAnchorPane;
|
private GridPane contentGridPane;
|
||||||
@FXML
|
@FXML
|
||||||
private Text windArrowText, windDirectionText;
|
private Text windArrowText, windDirectionText;
|
||||||
@FXML
|
@FXML
|
||||||
@@ -143,8 +141,8 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
// chatHistory.textProperty().addListener((obs, oldValue, newValue) -> {
|
// chatHistory.textProperty().addListener((obs, oldValue, newValue) -> {
|
||||||
// chatHistory.setScrollTop(Double.MAX_VALUE);
|
// chatHistory.setScrollTop(Double.MAX_VALUE);
|
||||||
// });
|
// });
|
||||||
contentAnchorPane.setOnMouseClicked((event) ->
|
contentGridPane.setOnMouseClicked((event) ->
|
||||||
contentAnchorPane.requestFocus()
|
contentGridPane.requestFocus()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +167,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
updateOrder(raceState.getPlayerPositions());
|
updateOrder(raceState.getPlayerPositions());
|
||||||
gameView = new GameView();
|
gameView = new GameView();
|
||||||
gameView.setFrameRateFXText(fpsDisplay);
|
gameView.setFrameRateFXText(fpsDisplay);
|
||||||
Platform.runLater(() -> contentAnchorPane.getChildren().add(0, gameView));
|
Platform.runLater(() -> contentGridPane.getChildren().add(0, gameView));
|
||||||
gameView.setBoats(new ArrayList<>(participants.values()));
|
gameView.setBoats(new ArrayList<>(participants.values()));
|
||||||
gameView.updateBorder(raceData.getCourseLimit());
|
gameView.updateBorder(raceData.getCourseLimit());
|
||||||
gameView.updateTokens(raceData.getTokens());
|
gameView.updateTokens(raceData.getTokens());
|
||||||
@@ -591,9 +589,9 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
FXMLLoader loader = new FXMLLoader(getClass().getResource("/views/FinishView.fxml"));
|
FXMLLoader loader = new FXMLLoader(getClass().getResource("/views/FinishView.fxml"));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
contentAnchorPane.getChildren().removeAll();
|
contentGridPane.getChildren().removeAll();
|
||||||
contentAnchorPane.getChildren().clear();
|
contentGridPane.getChildren().clear();
|
||||||
contentAnchorPane.getChildren().addAll((Pane) loader.load());
|
contentGridPane.getChildren().addAll((Pane) loader.load());
|
||||||
|
|
||||||
} catch (javafx.fxml.LoadException e) {
|
} catch (javafx.fxml.LoadException e) {
|
||||||
System.err.println(e.getCause().toString());
|
System.err.println(e.getCause().toString());
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
vgrow="SOMETIMES"/>
|
vgrow="SOMETIMES"/>
|
||||||
</rowConstraints>
|
</rowConstraints>
|
||||||
<children>
|
<children>
|
||||||
<GridPane fx:id="contentAnchorPane" GridPane.columnSpan="2"
|
<GridPane fx:id="contentGridPane" GridPane.columnSpan="2"
|
||||||
GridPane.rowSpan="3">
|
GridPane.rowSpan="3">
|
||||||
<columnConstraints>
|
<columnConstraints>
|
||||||
<ColumnConstraints hgrow="SOMETIMES"/>
|
<ColumnConstraints hgrow="SOMETIMES"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user