From 84e8ac89fc0737966abff5b0d0c5c2f39c241615 Mon Sep 17 00:00:00 2001 From: Calum Date: Wed, 26 Jul 2017 15:52:02 +1200 Subject: [PATCH] Added random name generator until players can chose how to identify themselves. --- .../annotations/ImportantAnnotationController.java | 1 + src/main/java/seng302/fxObjects/BoatAnnotations.java | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/seng302/controllers/annotations/ImportantAnnotationController.java b/src/main/java/seng302/controllers/annotations/ImportantAnnotationController.java index b9461e2d..2fe1c774 100644 --- a/src/main/java/seng302/controllers/annotations/ImportantAnnotationController.java +++ b/src/main/java/seng302/controllers/annotations/ImportantAnnotationController.java @@ -135,6 +135,7 @@ public class ImportantAnnotationController implements Initializable { boatEstTimeToNextMarkSelect.isSelected())); boatElapsedTimeSelect.setOnAction( event -> setAnnotation(Annotation.LEGTIME, boatElapsedTimeSelect.isSelected())); + // TODO: 26/07/17 cir27 - Create a more robust fix for this when the annotation for the game are decided upon. boatEstTimeToNextMarkSelect.setVisible(false); boatEstTimeToNextMarkSelect.setDisable(true); boatElapsedTimeSelect.setVisible(false); diff --git a/src/main/java/seng302/fxObjects/BoatAnnotations.java b/src/main/java/seng302/fxObjects/BoatAnnotations.java index 043b7b56..289007d2 100644 --- a/src/main/java/seng302/fxObjects/BoatAnnotations.java +++ b/src/main/java/seng302/fxObjects/BoatAnnotations.java @@ -66,7 +66,7 @@ public class BoatAnnotations extends Group{ legTimeObject.relocate(X_OFFSET_TEXT, Y_OFFSET_TEXT_INIT + Y_OFFSET_PER_TEXT * 4); legTimeObject.setVisible(false); - this.setVisibile(true, false, false, false); + this.setVisible(true, false, false, false); super.getChildren().addAll(background, teamNameObject, velocityObject, estTimeToNextMarkObject, legTimeObject); } @@ -111,10 +111,14 @@ public class BoatAnnotations extends Group{ } } - void setVisibile (boolean nameVisibility, boolean speedVisibility, + private void setVisible(boolean nameVisibility, boolean speedVisibility, boolean estTimeVisibility, boolean lastMarkVisibility) { int totalVisible = 0; + /* + This is a temporary fix until the new annotation group is added along with the visualiser + overhaul. + */ totalVisible = updateVisibility(nameVisibility, teamNameObject, totalVisible); if (isPlayer) totalVisible = updateVisibility(speedVisibility, velocityObject, totalVisible);