color fix for multiple boats
#story[1306]
This commit is contained in:
@@ -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()) {
|
||||
if(ThisBoat.getInstance().getLegNumber() == leg.getLegNumber()){
|
||||
return Color.ORANGE;
|
||||
}else{
|
||||
return Color.MEDIUMAQUAMARINE;
|
||||
}
|
||||
}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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user