Merge branch 'master' into nightmode

This commit is contained in:
Joseph Gardner
2017-09-28 15:43:49 +13:00
46 changed files with 458 additions and 102 deletions
@@ -67,8 +67,6 @@ public class HostGameController extends Controller {
sliderLength.setShowTickLabels(true);
sliderLength.setMajorTickUnit(MAX_RACE_LENGTH-1);
sliderLength.setBlockIncrement(1);
sliderLength.getStylesheets().add("/css/slider.css");
}
@@ -85,8 +83,8 @@ public class HostGameController extends Controller {
listOfMaps = new ArrayList(Arrays.asList(ac35Map, oMap, iMap, mMap));
mapImage.setImage(listOfMaps.get(currentMapIndex));
Platform.runLater(() -> {
mapImage.fitWidthProperty()
.bind(mapImage.getScene().getWindow().widthProperty().multiply(0.6));
mapImage.fitHeightProperty()
.bind(mapImage.getScene().getWindow().heightProperty().multiply(0.6));
});
}
@@ -2,6 +2,7 @@ package visualiser.Controllers;
import com.interactivemesh.jfx.importer.stl.StlMeshImporter;
import javafx.animation.AnimationTimer;
import javafx.application.Platform;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
@@ -12,6 +13,7 @@ import javafx.scene.control.RadioButton;
import javafx.scene.control.ToggleGroup;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.Pane;
import javafx.scene.media.AudioClip;
@@ -42,6 +44,7 @@ import java.util.logging.Logger;
* the game.
*/
public class TitleController extends Controller {
private @FXML AnchorPane titleWrapper;
private @FXML RadioButton dayModeRD;
private @FXML RadioButton nightModeRD;
private @FXML Button tutorialButton;
@@ -106,6 +109,8 @@ public class TitleController extends Controller {
}
};
loop.start();
titleWrapper.getStylesheets().add("/css/dayMode.css");
}
/**
@@ -81,9 +81,9 @@ public class View3D extends Pane {
/**
* Distance to stop zoom
*/
private final double ZOOM_IN_LIMIT = 3;
private final double ZOOM_IN_LIMIT = 15;
private final double ZOOM_OUT_LIMIT = 700;
private final double MAX_ZOOM_LIMIT = 1500;
private final double MAX_ZOOM_LIMIT = 1150;
private final double MAX_PITCH = 60; // birds eye view
private final double MIN_PITCH = 5; // third person view
private final double ZOOM_PER_KEYPRESS = 5; // distance changed per zoom
@@ -188,7 +188,7 @@ public class View3D extends Pane {
* Configures camera to third person view
*/
public void setThirdPerson() {
this.setDistance(ZOOM_IN_LIMIT * 2);
this.setDistance(ZOOM_IN_LIMIT * 5);
adjustPitchForZoom();
adjustScaleForZoom();
}
@@ -605,7 +605,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
//Prepare to draw.
gc.setLineWidth(1);
gc.setFill(Color.DEEPSKYBLUE);
gc.setFill(Color.web("#f1f1d4"));
//Calculate the screen coordinates of the boundary.