mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Fixed bug with initializing race view elements. Made chat box unselectable. Only manually tested.
#bugs #test #implement
This commit is contained in:
@@ -105,7 +105,7 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
private Timer timer = new Timer();
|
private Timer timer = new Timer();
|
||||||
private List<Series<String, Double>> sparkLineData = new ArrayList<>();
|
private List<Series<String, Double>> sparkLineData = new ArrayList<>();
|
||||||
private ImportantAnnotationsState importantAnnotations;
|
private ImportantAnnotationsState importantAnnotations;
|
||||||
private boolean done = false;
|
private ObservableList<ClientYacht> selectionComboBoxList = FXCollections.observableArrayList();
|
||||||
|
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
Sounds.stopMusic();
|
Sounds.stopMusic();
|
||||||
@@ -114,9 +114,9 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
importantAnnotations = new ImportantAnnotationsState();
|
importantAnnotations = new ImportantAnnotationsState();
|
||||||
|
|
||||||
//Formatting the y axis of the sparkline
|
//Formatting the y axis of the sparkline
|
||||||
// raceSparkLine.getYAxis().setRotate(180);
|
raceSparkLine.getYAxis().setRotate(180);
|
||||||
// raceSparkLine.getYAxis().setTickLabelRotation(180);
|
raceSparkLine.getYAxis().setTickLabelRotation(180);
|
||||||
// raceSparkLine.getYAxis().setTranslateX(-5);
|
raceSparkLine.getYAxis().setTranslateX(-5);
|
||||||
raceSparkLine.visibleProperty().setValue(false);
|
raceSparkLine.visibleProperty().setValue(false);
|
||||||
raceSparkLine.getYAxis().setAutoRanging(false);
|
raceSparkLine.getYAxis().setAutoRanging(false);
|
||||||
sparklineYAxis.setTickMarkVisible(false);
|
sparklineYAxis.setTickMarkVisible(false);
|
||||||
@@ -141,8 +141,9 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
// chatHistory.textProperty().addListener((obs, oldValue, newValue) -> {
|
// chatHistory.textProperty().addListener((obs, oldValue, newValue) -> {
|
||||||
// chatHistory.setScrollTop(Double.MAX_VALUE);
|
// chatHistory.setScrollTop(Double.MAX_VALUE);
|
||||||
// });
|
// });
|
||||||
done = true;
|
contentAnchorPane.setOnMouseClicked((event) ->
|
||||||
|
contentAnchorPane.requestFocus()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void loadRace (
|
public void loadRace (
|
||||||
@@ -193,12 +194,13 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
gameView.enableZoom();
|
gameView.enableZoom();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Platform.runLater(() -> {
|
||||||
initializeUpdateTimer();
|
initializeUpdateTimer();
|
||||||
initialiseFPSCheckBox();
|
initialiseFPSCheckBox();
|
||||||
initialiseAnnotationSlider();
|
initialiseAnnotationSlider();
|
||||||
initialiseBoatSelectionComboBox();
|
initialiseBoatSelectionComboBox();
|
||||||
initialiseSparkLine();
|
initialiseSparkLine();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -349,13 +351,6 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// XYChart.Series<String, Double> positionData = sparkLineData.get(yacht.getSourceID());
|
|
||||||
// positionData.getData().add(
|
|
||||||
// new XYChart.Data<>(
|
|
||||||
// Integer.toString(legNumber),
|
|
||||||
// 1.0 + participants.size() - yacht.getPlacing()
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -577,8 +572,8 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
|
|||||||
* for the combobox to take action upon selection
|
* for the combobox to take action upon selection
|
||||||
*/
|
*/
|
||||||
private void initialiseBoatSelectionComboBox() {
|
private void initialiseBoatSelectionComboBox() {
|
||||||
ObservableList<ClientYacht> selectables = FXCollections.observableArrayList(participants.values());
|
selectionComboBoxList.setAll(participants.values());
|
||||||
yachtSelectionComboBox.setItems(selectables);
|
yachtSelectionComboBox.setItems(selectionComboBoxList);
|
||||||
yachtSelectionComboBox.valueProperty().addListener((obs, lastSelection, selectedBoat) -> {
|
yachtSelectionComboBox.valueProperty().addListener((obs, lastSelection, selectedBoat) -> {
|
||||||
if (selectedBoat != null) {
|
if (selectedBoat != null) {
|
||||||
gameView.selectBoat(selectedBoat);
|
gameView.selectBoat(selectedBoat);
|
||||||
|
|||||||
Reference in New Issue
Block a user