Added random name generator until players can chose how to identify themselves.

This commit is contained in:
Calum
2017-07-26 15:52:02 +12:00
parent 12d081a1af
commit 84e8ac89fc
2 changed files with 7 additions and 2 deletions
@@ -135,6 +135,7 @@ public class ImportantAnnotationController implements Initializable {
boatEstTimeToNextMarkSelect.isSelected())); boatEstTimeToNextMarkSelect.isSelected()));
boatElapsedTimeSelect.setOnAction( boatElapsedTimeSelect.setOnAction(
event -> setAnnotation(Annotation.LEGTIME, boatElapsedTimeSelect.isSelected())); 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.setVisible(false);
boatEstTimeToNextMarkSelect.setDisable(true); boatEstTimeToNextMarkSelect.setDisable(true);
boatElapsedTimeSelect.setVisible(false); boatElapsedTimeSelect.setVisible(false);
@@ -66,7 +66,7 @@ public class BoatAnnotations extends Group{
legTimeObject.relocate(X_OFFSET_TEXT, Y_OFFSET_TEXT_INIT + Y_OFFSET_PER_TEXT * 4); legTimeObject.relocate(X_OFFSET_TEXT, Y_OFFSET_TEXT_INIT + Y_OFFSET_PER_TEXT * 4);
legTimeObject.setVisible(false); legTimeObject.setVisible(false);
this.setVisibile(true, false, false, false); this.setVisible(true, false, false, false);
super.getChildren().addAll(background, teamNameObject, velocityObject, estTimeToNextMarkObject, legTimeObject); 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) { boolean estTimeVisibility, boolean lastMarkVisibility) {
int totalVisible = 0; 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); totalVisible = updateVisibility(nameVisibility, teamNameObject, totalVisible);
if (isPlayer) if (isPlayer)
totalVisible = updateVisibility(speedVisibility, velocityObject, totalVisible); totalVisible = updateVisibility(speedVisibility, velocityObject, totalVisible);