diff --git a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/components/pop_up/PassagePopUp.java b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/components/pop_up/PassagePopUp.java index 41cfaf665d84c8cb649df8a5f38aadeaba3c8ffc..1bf38ef86cad79ddad51112c42d5a8e1d893660c 100644 --- a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/components/pop_up/PassagePopUp.java +++ b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/components/pop_up/PassagePopUp.java @@ -11,6 +11,8 @@ public class PassagePopUp { private TextArea contentArea; private Button saveButton; + + public PassagePopUp() { titleField = new TextField(); titleField.setPromptText("Enter the title of the passage"); diff --git a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/components/table/PassageTable.java b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/components/table/PassageTable.java index 1a3f146ea710fc6a8b20258008ee7219b2b48cb2..3fce06fc184bd75d34c3441a77b375d24aaefac0 100644 --- a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/components/table/PassageTable.java +++ b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/components/table/PassageTable.java @@ -1,5 +1,9 @@ package edu.ntnu.idatt2001.group_30.paths.view.components.table; +/** + * This class concerns itself with the aspects intrinsic to a passage table. + * @param <Passage> The type of the table, represented using a Passage object. + */ public class PassageTable<Passage> extends TableDisplay<Passage> { /** diff --git a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/CreatePlayerView.java b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/CreatePlayerView.java index 7da1049a7e5cdc0560d88739bf02dae287303b32..adde9dfba96338bd09aa19f8ece12d317dc46746 100644 --- a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/CreatePlayerView.java +++ b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/CreatePlayerView.java @@ -112,13 +112,15 @@ public class CreatePlayerView extends View<BorderPane> { nameField.setMinWidth(200); continueButton = new Button("Continue"); - returnButton = new Button("Return"); - HBox viewButtons = new HBox(returnButton, continueButton); - returnButton.setAlignment(Pos.CENTER_LEFT); - continueButton.setAlignment(Pos.CENTER_RIGHT); - viewButtons.setSpacing(200); + returnButton = new Button("Back"); - VBox bottomBox = new VBox(nameField, viewButtons); + getParentPane().setBottom(returnButton); + getParentPane().getBottom().setTranslateY(-50); + getParentPane().getBottom().setTranslateX(10); + + + + VBox bottomBox = new VBox(nameField, continueButton); bottomBox.setSpacing(20); bottomBox.setAlignment(Pos.CENTER); bottomBox.setPadding(new Insets(0, 0, 0, 0)); diff --git a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/LoadGameView.java b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/LoadGameView.java index 9c070d5d048a37087cb8dcee72a6a413604b6dbf..7e3bb4a20a26840ed188b2f92b9f2c9ecff793e0 100644 --- a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/LoadGameView.java +++ b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/LoadGameView.java @@ -56,14 +56,12 @@ public class LoadGameView extends View<BorderPane> { Button backButton = new Button("Back"); backButton.setOnAction(e -> StageManager.getInstance().goBack()); + getParentPane().setBottom(backButton); startButton = DefaultButton.medium("Start game", newGameController.goTo(PlaythroughView.class)); startButton.setVisible(false); - HBox buttonBox = new HBox(10, backButton, startButton); - buttonBox.setAlignment(Pos.CENTER); - - VBox containerWithButtons = new VBox(mainContainer, buttonBox); + VBox containerWithButtons = new VBox(mainContainer, startButton); containerWithButtons.setSpacing(20); containerWithButtons.setAlignment(Pos.CENTER); diff --git a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/NewStoryView.java b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/NewStoryView.java index 0cfe660b872abfc30b2fc8a81e54059ff1060cc6..5a34588dce5b4c544bab43ad75668da66e1473d7 100644 --- a/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/NewStoryView.java +++ b/src/main/java/edu/ntnu/idatt2001/group_30/paths/view/views/NewStoryView.java @@ -4,7 +4,6 @@ import edu.ntnu.idatt2001.group_30.paths.controller.NewStoryController; import edu.ntnu.idatt2001.group_30.paths.model.Link; import edu.ntnu.idatt2001.group_30.paths.model.Passage; import edu.ntnu.idatt2001.group_30.paths.model.Story; -import static edu.ntnu.idatt2001.group_30.paths.view.components.common.DefaultInputField.inputWithLabelAndPrompt; import static edu.ntnu.idatt2001.group_30.paths.PathsSingleton.INSTANCE; @@ -88,7 +87,11 @@ public class NewStoryView extends View<BorderPane> { display.setSpacing(10); display.setPrefWidth(500); + Button backButton = new Button("Back"); + backButton.setOnAction(newStoryController.goBack()); + getParentPane().setCenter(display); + getParentPane().setBottom(backButton); }