|
|
|
@ -46,10 +46,7 @@ import visualiser.utils.GPSConverter;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.net.URL;
|
|
|
|
import java.net.URL;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.Arrays;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
import java.util.logging.Level;
|
|
|
|
import java.util.logging.Level;
|
|
|
|
import java.util.logging.Logger;
|
|
|
|
import java.util.logging.Logger;
|
|
|
|
|
|
|
|
|
|
|
|
@ -295,8 +292,8 @@ public class RaceViewController extends Controller {
|
|
|
|
.markersVisible(true) // Defines if markers will be visible
|
|
|
|
.markersVisible(true) // Defines if markers will be visible
|
|
|
|
//.markers(marker1, marker2) // Defines markers that will be drawn
|
|
|
|
//.markers(marker1, marker2) // Defines markers that will be drawn
|
|
|
|
// Related to Value
|
|
|
|
// Related to Value
|
|
|
|
.animated(true) // Defines if the needle will be animated
|
|
|
|
//.animated(true) // Defines if the needle will be animated
|
|
|
|
.animationDuration(500) // Defines the speed of the needle in milliseconds (10 - 10000 ms)
|
|
|
|
//.animationDuration(500) // Defines the speed of the needle in milliseconds (10 - 10000 ms)
|
|
|
|
.build();
|
|
|
|
.build();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
@ -764,14 +761,13 @@ public class RaceViewController extends Controller {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
gauge.setValue(raceState.getBoat(raceState.getPlayerBoatID()).getCurrentSpeed());
|
|
|
|
gauge.setValue(raceState.getBoat(raceState.getPlayerBoatID()).getCurrentSpeed());
|
|
|
|
fGauge.getGauge().setValue(raceState.getBoat(raceState.getPlayerBoatID()).getCurrentSpeed());
|
|
|
|
fGauge.getGauge().setValue(raceState.getBoat(raceState.getPlayerBoatID()).getCurrentSpeed());
|
|
|
|
if(System.currentTimeMillis() > positionTime+positionDelay) {
|
|
|
|
//Thread.sleep(50);
|
|
|
|
for (VisualiserBoat boat : boatInfoTable.getItems()) {
|
|
|
|
List<VisualiserBoat> boatList = boatInfoTable.getItems();
|
|
|
|
if (raceState.getPlayerBoatID() == boat.getSourceID()) {
|
|
|
|
for (VisualiserBoat boat : boatList){
|
|
|
|
gauge.setTitle("Position: " + (boatInfoTable.getItems().indexOf(boat) + 1));
|
|
|
|
if(raceState.getPlayerBoatID()==boat.getSourceID()){
|
|
|
|
fGauge.getGauge().setTitle("Position: " + (boatInfoTable.getItems().indexOf(boat) + 1));
|
|
|
|
gauge.titleProperty().setValue("Position: " + (boatInfoTable.getItems().indexOf(boat)+1));
|
|
|
|
}
|
|
|
|
fGauge.getGauge().titleProperty().setValue("Position: " + (boatInfoTable.getItems().indexOf(boat)+1));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
positionTime = System.currentTimeMillis();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch (BoatNotFoundException e) {
|
|
|
|
} catch (BoatNotFoundException e) {
|
|
|
|
e.printStackTrace();
|
|
|
|
e.printStackTrace();
|
|
|
|
|