main
hba56 8 years ago
parent 731be68831
commit f3f60acac6

@ -63,6 +63,7 @@ public class RaceViewController extends Controller {
private View3D view3D; private View3D view3D;
private ObservableList<Subject3D> viewSubjects; private ObservableList<Subject3D> viewSubjects;
private ResizableRaceCanvas raceCanvas; private ResizableRaceCanvas raceCanvas;
private boolean mapToggle = true;
/** /**
* Arrow pointing to next mark in third person * Arrow pointing to next mark in third person
@ -146,6 +147,9 @@ public class RaceViewController extends Controller {
// tab key // tab key
if (codeString.equals("TAB")){toggleTable();} if (codeString.equals("TAB")){toggleTable();}
//map key
if (codeString.equals("M")){bigMap();}
// any key pressed // any key pressed
ControlKey controlKey = keyFactory.getKey(codeString); ControlKey controlKey = keyFactory.getKey(codeString);
if(controlKey != null) { if(controlKey != null) {
@ -758,4 +762,22 @@ public class RaceViewController extends Controller {
canvasBase1.getChildren().add(0, raceCanvas); canvasBase1.getChildren().add(0, raceCanvas);
} }
private void bigMap(){
if (mapToggle){
raceCanvas.widthProperty().bind(canvasBase.widthProperty());
raceCanvas.heightProperty().bind(canvasBase.heightProperty());
canvasBase1.getChildren().remove(raceCanvas);
canvasBase.getChildren().add(1, raceCanvas);
}else{
raceCanvas.widthProperty().bind(canvasBase1.widthProperty());
raceCanvas.heightProperty().bind(canvasBase1.heightProperty());
canvasBase.getChildren().remove(raceCanvas);
canvasBase1.getChildren().add(0, raceCanvas);
}
mapToggle = !mapToggle;
}
} }

Loading…
Cancel
Save