fixed being able to zoom while chatting by holding shift and then pressing z and x #story[1246]

This commit is contained in:
Peter Galloway
2017-08-31 17:26:02 +12:00
parent 01ca3f3453
commit 45fa73595f
2 changed files with 35 additions and 13 deletions
@@ -160,7 +160,6 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
gameView.updateCourse(
new ArrayList<>(raceData.getCompoundMarks().values()), raceData.getMarkSequence()
);
gameView.enableZoom();
gameView.setBoatAsPlayer(player);
gameView.startRace();
@@ -175,6 +174,13 @@ public class RaceViewController extends Thread implements ImportantAnnotationDel
updateWindDirection(raceState.windDirectionProperty().doubleValue());
updateWindSpeed(raceState.getWindSpeed());
gameView.setWindDir(raceState.windDirectionProperty().doubleValue());
chatInput.focusedProperty().addListener((obs, oldValue, newValue) -> {
if (newValue) {
gameView.disableZoom();
} else {
gameView.enableZoom();
}
});
}
/**