diff --git a/src/main/java/app/controller/settings/SettingsGenerator.java b/src/main/java/app/controller/settings/SettingsGenerator.java index 477c705d..cc511e60 100644 --- a/src/main/java/app/controller/settings/SettingsGenerator.java +++ b/src/main/java/app/controller/settings/SettingsGenerator.java @@ -8,12 +8,16 @@ public abstract class SettingsGenerator public static Settings mockSettings() { Settings settings = new Settings(); - settings.setHeight(400); - settings.setWidth(300); - settings.addFurniture(new Rectangle2D(10, 10, 10, 10), FurnitureType.WALL); - settings.addFurniture(new Rectangle2D(30, 10, 10, 10), FurnitureType.GLASS); - settings.addFurniture(new Rectangle2D(10, 30, 10, 10), FurnitureType.TARGET); - settings.addFurniture(new Rectangle2D(30, 30, 10, 10), FurnitureType.TOWER); + settings.setName("best_map"); + settings.setGameMode(1); + settings.setTimeStep(0.5); + settings.setScaling(0.1); + settings.setNoOfGuards(3); + settings.setNoOfIntruders(5); + settings.setWalkSpeedGuard(13.5); + settings.setWalkSpeedIntruder(15.0); + settings.setSprintSpeedGuard(21.5); + settings.setSprintSpeedIntruder(23); return settings; } diff --git a/src/main/java/app/view/mapBuilder/FurniturePane.java b/src/main/java/app/view/mapBuilder/FurniturePane.java index cbddc3a8..9dacdd1b 100644 --- a/src/main/java/app/view/mapBuilder/FurniturePane.java +++ b/src/main/java/app/view/mapBuilder/FurniturePane.java @@ -55,12 +55,6 @@ public void loadButtons(VBox vbox) vbox.getChildren().addAll(teleport, x, y); - // Spawn areas - Label spawns = new Label("Spwan Areas:"); - Button aSpawn = new Button("Agent Spawn Area"); - Button iSpawn = new Button("Intruder Spawn Area"); - vbox.getChildren().addAll(spawns, aSpawn, iSpawn); - // Furniture type enums Label furniture = new Label("Furniture Items:"); vbox.getChildren().add(furniture); diff --git a/src/main/java/app/view/mapBuilder/SettingsPane.java b/src/main/java/app/view/mapBuilder/SettingsPane.java index aaff2913..120a67d4 100644 --- a/src/main/java/app/view/mapBuilder/SettingsPane.java +++ b/src/main/java/app/view/mapBuilder/SettingsPane.java @@ -1,17 +1,51 @@ package app.view.mapBuilder; +import app.controller.settings.Settings; +import javafx.geometry.Insets; import javafx.scene.control.Label; import javafx.scene.layout.StackPane; +import javafx.scene.layout.VBox; +import javafx.scene.text.Font; +import javafx.scene.text.FontWeight; public class SettingsPane extends StackPane // Might need to change this to extend something else { private StartMenu startMenu; + private Settings s; - public SettingsPane(StartMenu startMenu) + public SettingsPane(StartMenu startMenu, Settings s) { this.startMenu = startMenu; + this.s = s; - Label label = new Label("Settings Go Here"); - this.getChildren().add(label); + // Labels displaying current settings information. + VBox vbox = new VBox(10); + Label header = new Label("Current simulation settings:"); + header.setFont(Font.font("", FontWeight.BOLD, 24)); + Label mapName = new Label("Map Name - " + s.getName()); + mapName.setFont(new Font(16)); + Label gameMode = new Label("Game Mode - " + s.getGameMode()); + gameMode.setFont(new Font(16)); + Label timeStep = new Label("Time Step - " + s.getTimeStep()); + timeStep.setFont(new Font(16)); + Label scaling = new Label("Scaling - " + s.getScaling()); + scaling.setFont(new Font(16)); + Label noOfGuards = new Label("Number of Guards - " + s.getNoOfGuards()); + noOfGuards.setFont(new Font(16)); + Label noOfIntruders = new Label("Number of Intruders - " + s.getNoOfIntruders()); + noOfIntruders.setFont(new Font(16)); + Label baseGuard = new Label("Walk speed Guard - " + s.getWalkSpeedGuard()); + baseGuard.setFont(new Font(16)); + Label baseIntruder = new Label("Walk speed Intruder - " + s.getWalkSpeedIntruder()); + baseIntruder.setFont(new Font(16)); + Label sprintGuard = new Label("Sprint speed Guard - " + s.getSprintSpeedGuard()); + sprintGuard.setFont(new Font(16)); + Label sprintIntruder = new Label("Sprint speed Intruder - " + s.getSprintSpeedIntruder()); + sprintIntruder.setFont(new Font(16)); + vbox.getChildren().addAll( header, mapName, gameMode, timeStep, scaling, noOfGuards, + noOfIntruders, baseGuard, baseIntruder, sprintGuard, + sprintIntruder); + this.setMargin(vbox, new Insets(10, 10, 10, 10)); + this.getChildren().addAll(vbox); } } diff --git a/src/main/java/app/view/mapBuilder/StartMenu.java b/src/main/java/app/view/mapBuilder/StartMenu.java index 3db2791f..dcfe5b80 100644 --- a/src/main/java/app/view/mapBuilder/StartMenu.java +++ b/src/main/java/app/view/mapBuilder/StartMenu.java @@ -1,6 +1,7 @@ package app.view.mapBuilder; import app.App; +import app.controller.settings.SettingsGenerator; import app.view.FileMenuBar; import javafx.scene.layout.BorderPane; import lombok.Getter; @@ -15,7 +16,7 @@ public StartMenu(App app) this.setTop(new FileMenuBar(app)); MapBuilder mb = new MapBuilder(this); this.setLeft(new FurniturePane(this, mb)); - this.setRight(new SettingsPane(this)); + this.setRight(new SettingsPane(this, SettingsGenerator.mockSettings())); this.setCenter(mb); } }