Skip to content
Snippets Groups Projects
Commit 177f548e authored by Trym Hamer Gudvangen's avatar Trym Hamer Gudvangen
Browse files

styles: add back button to the bottom of parent pane

parent 51d9ff4a
No related branches found
No related tags found
2 merge requests!34Feat/create story gui,!7Feat/part three
......@@ -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");
......
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> {
/**
......
......@@ -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));
......
......@@ -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);
......
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment