From ef46303949173cd67cf00a4f40d16f1375ed2250 Mon Sep 17 00:00:00 2001 From: sowgro Date: Sun, 1 Sep 2024 16:24:25 -0400 Subject: Smooth scrolling in NotesEditor2 and other improvements - select multiple checkbox - make taget and block take less prams - block sizing changes - fix sort in LeaderboardView --- src/main/java/net/sowgro/npehero/editor/DiffEditor.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/main/java/net/sowgro/npehero/editor/DiffEditor.java') diff --git a/src/main/java/net/sowgro/npehero/editor/DiffEditor.java b/src/main/java/net/sowgro/npehero/editor/DiffEditor.java index d3ecdc4..9a4365d 100755 --- a/src/main/java/net/sowgro/npehero/editor/DiffEditor.java +++ b/src/main/java/net/sowgro/npehero/editor/DiffEditor.java @@ -171,11 +171,13 @@ public class DiffEditor extends Page // Duplicates of NotesEditor2 methods, should be made generic and combined 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)); - b.widthProperty().bind(scroll.widthProperty().divide(8)); - b.arcHeightProperty().bind(scroll.widthProperty().divide(25)); - b.arcWidthProperty().bind(scroll.widthProperty().divide(25)); + Block b = new Block(color, false, n); + var sizeBind = scroll.widthProperty().divide(8); + b.heightProperty().bind(sizeBind); + b.widthProperty().bind(sizeBind); + var arcBind = scroll.widthProperty().divide(30); + b.arcHeightProperty().bind(arcBind); + b.arcWidthProperty().bind(arcBind); b.strokeWidthProperty().bind(scroll.widthProperty().divide(120)); b.layoutYProperty().bind(secondToScreenPos(n.time.add(0))); return b; -- cgit v1.2.3