color fix for multiple boats

#story[1306]
main
hba56 8 years ago
parent 1783e73caf
commit a8cd7755b8

@ -794,18 +794,11 @@ public class ResizableRaceCanvas extends ResizableCanvas {
}
private Color getLineColor(Leg leg) {
for (VisualiserBoat boat : raceState.getBoats()) {
if (boat.isClientBoat()) {
if (boat.getCurrentLeg().getLegNumber() == leg.getLegNumber()) {
return Color.ORANGE;
} else {
return Color.MEDIUMAQUAMARINE;
}
}else{
return Color.MEDIUMAQUAMARINE;
}
if(ThisBoat.getInstance().getLegNumber() == leg.getLegNumber()){
return Color.ORANGE;
}else{
return Color.MEDIUMAQUAMARINE;
}
return Color.MEDIUMAQUAMARINE;
}
private void drawArrowHead(GPSCoordinate start, GPSCoordinate end){

@ -35,6 +35,14 @@ public class ThisBoat {
}
}
public int getLegNumber(){
if(this.boat != null){
return this.boat.getCurrentLeg().getLegNumber();
}else{
return 0;
}
}
public void setBoat(VisualiserBoat boat) {
this.boat = boat;
}

Loading…
Cancel
Save