aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/sowgro/npehero/editor/DiffEditor.java
diff options
context:
space:
mode:
authorsowgro <tpoke.ferrari@gmail.com>2024-08-28 19:50:58 -0400
committersowgro <tpoke.ferrari@gmail.com>2024-08-28 19:50:58 -0400
commitc3554cb31774afc8bf335b761649b7aacf7128c5 (patch)
treec7b40548cfb8500fd716fd65fb03513a231c0f4a /src/main/java/net/sowgro/npehero/editor/DiffEditor.java
parentf3a037701799169066c6cb12b3c7023029b8b281 (diff)
downloadNPEhero-c3554cb31774afc8bf335b761649b7aacf7128c5.tar.gz
NPEhero-c3554cb31774afc8bf335b761649b7aacf7128c5.tar.bz2
NPEhero-c3554cb31774afc8bf335b761649b7aacf7128c5.zip
Fix sizing of tables, improve display of level details, improve logo
Diffstat (limited to 'src/main/java/net/sowgro/npehero/editor/DiffEditor.java')
-rwxr-xr-xsrc/main/java/net/sowgro/npehero/editor/DiffEditor.java11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/main/java/net/sowgro/npehero/editor/DiffEditor.java b/src/main/java/net/sowgro/npehero/editor/DiffEditor.java
index 7671bc6..8591019 100755
--- a/src/main/java/net/sowgro/npehero/editor/DiffEditor.java
+++ b/src/main/java/net/sowgro/npehero/editor/DiffEditor.java
@@ -10,7 +10,6 @@ import net.sowgro.npehero.Driver;
import net.sowgro.npehero.gameplay.Block;
import net.sowgro.npehero.gui.LevelSurround;
import javafx.scene.layout.VBox;
-import javafx.scene.text.Text;
import net.sowgro.npehero.levelapi.Difficulty;
import net.sowgro.npehero.levelapi.Note;
import net.sowgro.npehero.main.*;
@@ -30,11 +29,11 @@ public class DiffEditor extends Page
this.diff = diff;
this.prev = prev;
- Text folderNameLabel = new Text("Folder name");
+ Label folderNameLabel = new Label("Folder name");
TextField folderName = new TextField(diff.thisDir.getName());
folderName.setDisable(true);
- Text titleLabel = new Text("Title");
+ Label titleLabel = new Label("Title");
TextField title = new TextField(diff.title);
Button editNotes = new Button("Edit notes");
@@ -110,6 +109,8 @@ public class DiffEditor extends Page
scroll.getStyleClass().remove("scroll-pane");
scroll.getStyleClass().add("box");
// scroll.setPrefHeight(400);
+ System.out.println("dbg"+scroll.heightProperty());
+ // TODO scroll.heightProperty is 0 here until the window is resized, idk what to do
scroll.prefWidthProperty().bind(scroll.heightProperty().multiply(0.66));
Pane[] lanes = new Pane[5];
@@ -121,7 +122,7 @@ public class DiffEditor extends Page
scrollContent.setSpacing(5);
scrollContent.setAlignment(Pos.CENTER);
- diff.notes.list.forEach(n -> lanes[n.lane].getChildren().add(drawNote(n)));
+ diff.notes.list.forEach(n -> lanes[n.lane].getChildren().add(drawBlock(n)));
VBox notePreview = new VBox();
@@ -170,7 +171,7 @@ public class DiffEditor extends Page
}
// Duplicates of NotesEditor2 methods, should be made generic and combined
- private Block drawNote(Note n) {
+ private Block drawBlock(Note n) {
Color color = diff.level.colors[n.lane];
Block b = new Block(color,20, 20, 5, false, n);
b.heightProperty().bind(scroll.widthProperty().divide(8));