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) {
|
private Color getLineColor(Leg leg) {
|
||||||
for (VisualiserBoat boat : raceState.getBoats()) {
|
if(ThisBoat.getInstance().getLegNumber() == leg.getLegNumber()){
|
||||||
if (boat.isClientBoat()) {
|
|
||||||
if (boat.getCurrentLeg().getLegNumber() == leg.getLegNumber()) {
|
|
||||||
return Color.ORANGE;
|
return Color.ORANGE;
|
||||||
}else{
|
}else{
|
||||||
return Color.MEDIUMAQUAMARINE;
|
return Color.MEDIUMAQUAMARINE;
|
||||||
}
|
}
|
||||||
}else{
|
|
||||||
return Color.MEDIUMAQUAMARINE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return Color.MEDIUMAQUAMARINE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void drawArrowHead(GPSCoordinate start, GPSCoordinate end){
|
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) {
|
public void setBoat(VisualiserBoat boat) {
|
||||||
this.boat = boat;
|
this.boat = boat;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user