Skip to content
Snippets Groups Projects
Commit 2ecd7c1c authored by Edvard Berdal Eek's avatar Edvard Berdal Eek
Browse files

Fix wrong button placement

parent 431ac5f0
No related branches found
No related tags found
1 merge request!20Created test classes for Factory and FileReader. Created equals methods
Pipeline #288207 passed
......@@ -36,13 +36,7 @@ public class ExplorePage extends GamePage {
this.setBottom(bottomBar);
this.setTop(topBar);
gc.getCanvas().setOnScroll(event -> {
try {
exploreGameController.onScroll(event);
} catch (Exception e) {
exploreGameController.resetImage();
}
});
gc.getCanvas().setOnScroll(exploreGameController::onScroll);
this.setOnMousePressed(exploreGameController::mousePressed);
this.setOnMouseDragged(exploreGameController::mouseDragged);
this.setOnMouseReleased(exploreGameController::mouseReleased);
......
package org.example.chaosgame.view.components;
import java.util.List;
import javafx.scene.control.ButtonBar;
import javafx.scene.control.ButtonType;
import javafx.scene.control.Dialog;
import javafx.scene.control.TextField;
......@@ -24,8 +26,8 @@ public class MinMaxDialog extends Dialog<List<String>> {
setTitle("Set Min/Max Coordinates");
setHeaderText("Please enter the min and max coordinates:");
ButtonType okButtonType = new ButtonType("OK");
getDialogPane().getButtonTypes().addAll(ButtonType.CANCEL, okButtonType);
ButtonType saveButtonType = new ButtonType("Save", ButtonBar.ButtonData.OK_DONE);
this.getDialogPane().getButtonTypes().addAll(saveButtonType, ButtonType.CANCEL);
GridPane grid = new GridPane();
grid.setHgap(10);
......@@ -49,7 +51,7 @@ public class MinMaxDialog extends Dialog<List<String>> {
getDialogPane().setContent(grid);
setResultConverter(dialogButton -> {
if (dialogButton == okButtonType) {
if (dialogButton == saveButtonType) {
String minX = minXField.getText();
String minY = minYField.getText();
String maxX = maxXField.getText();
......
......@@ -15,7 +15,7 @@ public class NumberOfStepsInput extends TextField {
this.setPromptText("Number of steps");
this.setMaxWidth(180);
this.setMinWidth(180);
this.setMinHeight(30);
this.setMaxHeight(30);
this.setMinHeight(40);
this.setMaxHeight(40);
}
}
......@@ -27,8 +27,8 @@
.text-field {
-fx-font: 20 arial;
-fx-background-color: #252525;
-fx-text-fill: white;
-fx-background-color: white;
-fx-text-fill: black;
-fx-border-color: #3b3b3b;
-fx-background-radius: 20;
-fx-border-radius: 20;
......@@ -60,7 +60,6 @@
.combo-box .indexed-cell:selected {
-fx-text-fill: white;
-fx-background-radius: 20;
}
.choose-game-button {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment