generated from S010MON/java-gradle-fx
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SeTtings Panel displays the parameters of the settings object loaded via constructor. Start Menu changed to create mock settings to display. Removed unnecessary duplication of buttons from furniture panel. Mock settings method in settings generator changed to test the workings of the settings panel.
- Loading branch information
1 parent
a92da99
commit 10cecc4
Showing
4 changed files
with
49 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters