diff options
Diffstat (limited to 'src/main/java/net/sowgro/npehero/gui')
6 files changed, 15 insertions, 40 deletions
diff --git a/src/main/java/net/sowgro/npehero/gui/GameOver.java b/src/main/java/net/sowgro/npehero/gui/GameOver.java index da524dc..cd277e6 100755 --- a/src/main/java/net/sowgro/npehero/gui/GameOver.java +++ b/src/main/java/net/sowgro/npehero/gui/GameOver.java @@ -18,11 +18,7 @@ import net.sowgro.npehero.main.Sound; public class GameOver extends Pane { - /* - * this class is a layout class, most of its purpose is to place UI elements like Buttons within Panes like VBoxes. - * the creation of these UI elements are mostly not commented due to their repetitive and self explanatory nature. - * style classes are defined in the style.css file. - */ + public GameOver(Level level, Difficulty diff, Pane lastMenu, int score2) { Text topText = new Text(); diff --git a/src/main/java/net/sowgro/npehero/gui/LeaderboardView.java b/src/main/java/net/sowgro/npehero/gui/LeaderboardView.java index 4741823..c769264 100755 --- a/src/main/java/net/sowgro/npehero/gui/LeaderboardView.java +++ b/src/main/java/net/sowgro/npehero/gui/LeaderboardView.java @@ -17,11 +17,7 @@ import net.sowgro.npehero.main.Sound; public class LeaderboardView extends Pane { - /* - * this class is a layout class, most of its purpose is to place UI elements like Buttons within Panes like VBoxes. - * the creation of these UI elements are mostly not commented due to their repetitive and self explanatory nature. - * style classes are defined in the style.css file. - */ + public LeaderboardView(Level level, Difficulty diff, Pane prev) { //sets up table view: requires java bean getters, setters and constructors to work diff --git a/src/main/java/net/sowgro/npehero/gui/LevelSelector.java b/src/main/java/net/sowgro/npehero/gui/LevelSelector.java index 3553267..eb08a99 100755 --- a/src/main/java/net/sowgro/npehero/gui/LevelSelector.java +++ b/src/main/java/net/sowgro/npehero/gui/LevelSelector.java @@ -15,11 +15,7 @@ import net.sowgro.npehero.main.Sound; public class LevelSelector extends Pane { - /* - * this class is a layout class, most of its purpose is to place UI elements like Buttons within Panes like VBoxes. - * the creation of these UI elements are mostly not commented due to their repetitive and self explanatory nature. - * style classes are defined in the style.css file. - */ + public LevelSelector() { //sets up table view: requires special getters, setters and constructors to work diff --git a/src/main/java/net/sowgro/npehero/gui/LevelSurround.java b/src/main/java/net/sowgro/npehero/gui/LevelSurround.java index b864c08..2a0a51a 100755 --- a/src/main/java/net/sowgro/npehero/gui/LevelSurround.java +++ b/src/main/java/net/sowgro/npehero/gui/LevelSurround.java @@ -18,11 +18,7 @@ import net.sowgro.npehero.main.Sound; public class LevelSurround extends Pane { - /* - * this class is a layout class, most of its purpose is to place UI elements like Buttons within Panes like VBoxes. - * the creation of these UI elements are mostly not commented due to their repetitive and self explanatory nature. - * style classes are defined in the style.css file. - */ + public LevelSurround(Level level, Difficulty difficulty, Pane prev) { ScoreController sc = new ScoreController(); diff --git a/src/main/java/net/sowgro/npehero/gui/MainMenu.java b/src/main/java/net/sowgro/npehero/gui/MainMenu.java index 2587f41..6511f22 100755 --- a/src/main/java/net/sowgro/npehero/gui/MainMenu.java +++ b/src/main/java/net/sowgro/npehero/gui/MainMenu.java @@ -10,18 +10,15 @@ import javafx.scene.paint.Color; import javafx.scene.text.Text; import net.sowgro.npehero.Driver; import net.sowgro.npehero.devmenu.LevelList; +import net.sowgro.npehero.main.Page; import net.sowgro.npehero.main.Sound; -public class MainMenu extends Pane -{ - /* - * this class is a layout class, most of its purpose is to place UI elements like Buttons within Panes like VBoxes. - * the creation of these UI elements are mostly not commented due to their repetitive and self explanatory nature. - * style classes are defined in the style.css file. - */ - public MainMenu() - { +public class MainMenu extends Page { + + @Override + public Pane getContent() { + DropShadow dropShadow = new DropShadow(); dropShadow.setRadius(50.0); dropShadow.setColor(Color.WHITE); @@ -34,7 +31,7 @@ public class MainMenu extends Pane Button play = new Button(); play.setText("Play"); - play.setOnAction(e -> { + play.setOnAction(_ -> { Driver.setMenu(new LevelSelector()); Sound.playSfx(Sound.FORWARD); }); @@ -47,14 +44,14 @@ public class MainMenu extends Pane }); Button levelEdit = new Button("Level Editor"); - levelEdit.setOnAction(e -> { + levelEdit.setOnAction(_ -> { Sound.playSfx(Sound.FORWARD); Driver.setMenu(new LevelList()); }); Button exit = new Button(); exit.setText("Quit"); - exit.setOnAction(e -> { + exit.setOnAction(_ -> { Sound.playSfx(Sound.BACKWARD); // Driver.quit(); // Platform.exit(); @@ -72,11 +69,9 @@ public class MainMenu extends Pane centerBox.setSpacing(10); VBox rootBox = new VBox(); - rootBox.prefWidthProperty().bind(super.prefWidthProperty()); - rootBox.prefHeightProperty().bind(super.prefHeightProperty()); rootBox.setAlignment(Pos.CENTER); rootBox.getChildren().add(centerBox); - super.getChildren().add(rootBox); + return rootBox; } } diff --git a/src/main/java/net/sowgro/npehero/gui/SettingsEditor.java b/src/main/java/net/sowgro/npehero/gui/SettingsEditor.java index 4dcd3dc..b00420a 100755 --- a/src/main/java/net/sowgro/npehero/gui/SettingsEditor.java +++ b/src/main/java/net/sowgro/npehero/gui/SettingsEditor.java @@ -16,11 +16,7 @@ import net.sowgro.npehero.main.Sound; public class SettingsEditor extends Pane { - /* - * this class is a layout class, most of its purpose is to place UI elements like Buttons within Panes like VBoxes. - * the creation of these UI elements are mostly not commented due to their repetitive and self explanatory nature. - * style classes are defined in the style.css file. - */ + public SettingsEditor() { Text musicText = new Text(); |