Same changes to dev. #story[1311]
This commit is contained in:
@@ -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,15 +761,14 @@ 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();
|
||||||
|
for (VisualiserBoat boat : boatList){
|
||||||
if(raceState.getPlayerBoatID()==boat.getSourceID()){
|
if(raceState.getPlayerBoatID()==boat.getSourceID()){
|
||||||
gauge.setTitle("Position: " + (boatInfoTable.getItems().indexOf(boat) + 1));
|
gauge.titleProperty().setValue("Position: " + (boatInfoTable.getItems().indexOf(boat)+1));
|
||||||
fGauge.getGauge().setTitle("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();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user