mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Implemented estimated time to next mark. Added checkbox for estimated time to next mark. To be fix: change from long to human readable time, update time every second
#story[923]
This commit is contained in:
@@ -28,6 +28,9 @@ public class ImportantAnnotationController implements Initializable {
|
||||
@FXML
|
||||
private CheckBox boatNameSelect;
|
||||
|
||||
@FXML
|
||||
private CheckBox boatEstTimeToNextMarkSelect;
|
||||
|
||||
@FXML
|
||||
private AnchorPane annotationSelectWindow;
|
||||
|
||||
@@ -87,6 +90,10 @@ public class ImportantAnnotationController implements Initializable {
|
||||
boatNameSelect.setSelected(importantAnnotations.get(key));
|
||||
break;
|
||||
|
||||
case "BoatEstTimeToNextMark":
|
||||
boatEstTimeToNextMarkSelect.setSelected(importantAnnotations.get(key));
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -120,6 +127,11 @@ public class ImportantAnnotationController implements Initializable {
|
||||
sendUpdate();
|
||||
});
|
||||
|
||||
boatEstTimeToNextMarkSelect.setOnAction(event -> {
|
||||
setAnnotation("BoatEstTimeToNextMark", boatEstTimeToNextMarkSelect.isSelected());
|
||||
sendUpdate();
|
||||
});
|
||||
|
||||
closeButton.setOnAction(event -> stage.close());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -315,6 +315,7 @@ public class RaceViewController extends Thread{
|
||||
BoatGroup bg = (BoatGroup) ro;
|
||||
bg.setTeamNameObjectVisible(false);
|
||||
bg.setVelocityObjectVisible(false);
|
||||
bg.setEstTimeToNextMarkVisible(false);
|
||||
bg.setLineGroupVisible(false);
|
||||
bg.setWakeVisible(false);
|
||||
}
|
||||
@@ -326,6 +327,7 @@ public class RaceViewController extends Thread{
|
||||
BoatGroup bg = (BoatGroup) ro;
|
||||
bg.setTeamNameObjectVisible(true);
|
||||
bg.setVelocityObjectVisible(false);
|
||||
bg.setEstTimeToNextMarkVisible(false);
|
||||
bg.setLineGroupVisible(false);
|
||||
bg.setWakeVisible(false);
|
||||
}
|
||||
@@ -348,7 +350,14 @@ public class RaceViewController extends Thread{
|
||||
bg.setVelocityObjectVisible(true);
|
||||
}
|
||||
else{
|
||||
bg.setTeamNameObjectVisible(false);
|
||||
bg.setVelocityObjectVisible(false);
|
||||
}
|
||||
|
||||
if (importantAnnotations.containsKey("BoatEstTimeToNextMark") && importantAnnotations.get("BoatEstTimeToNextMark")) {
|
||||
bg.setEstTimeToNextMarkVisible(true);
|
||||
}
|
||||
else{
|
||||
bg.setEstTimeToNextMarkVisible(false);
|
||||
}
|
||||
|
||||
if (importantAnnotations.containsKey("BoatTrack") && importantAnnotations.get("BoatTrack")){
|
||||
@@ -373,6 +382,7 @@ public class RaceViewController extends Thread{
|
||||
BoatGroup bg = (BoatGroup) ro;
|
||||
bg.setTeamNameObjectVisible(true);
|
||||
bg.setVelocityObjectVisible(true);
|
||||
bg.setEstTimeToNextMarkVisible(true);
|
||||
bg.setLineGroupVisible(true);
|
||||
bg.setWakeVisible(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user