mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
fixed bug from merge where est time to next mark was null on some boats #story[923]
This commit is contained in:
@@ -58,10 +58,10 @@ public class StartScreenController implements Initializable {
|
||||
contentPane.getChildren().addAll((Pane) FXMLLoader.load(getClass().getResource(jfxUrl)));
|
||||
}
|
||||
catch(javafx.fxml.LoadException e){
|
||||
System.err.println(e.getCause());
|
||||
e.printStackTrace();
|
||||
}
|
||||
catch(IOException e){
|
||||
System.err.println(e);
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -217,11 +217,14 @@ public class BoatGroup extends Group{
|
||||
if (estTimeToNextMarkObject == null){
|
||||
estTimeToNextMarkObject = getTextObject("", textColor);
|
||||
}
|
||||
|
||||
if (boat.getEstimateTimeAtNextMark() != null){
|
||||
DateFormat format = new SimpleDateFormat("mm:ss");
|
||||
String timeToNextMark = format
|
||||
.format(boat.getEstimateTimeAtNextMark() - StreamParser.getCurrentTimeLong());
|
||||
estTimeToNextMarkObject.setText("Next mark: " + timeToNextMark);
|
||||
} else {
|
||||
estTimeToNextMarkObject.setText("Next mark: -");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user