From d70443288376c1d0366c74ae9eb2f788d4ff0eb1 Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Sat, 18 Nov 2023 21:19:26 -0700 Subject: [PATCH] grahhh i had to do something and forogt to commit --- source/funkin/editors/charter/Charter.hx | 12 ++++++------ source/funkin/editors/charter/CharterNote.hx | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 0c181ad6..dfc99d57 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -380,9 +380,8 @@ class Charter extends UIState { selectionBox.incorporeal = true; noteHoverer = new CharterNote(); - noteHoverer.snappedToStrumline = false; - noteHoverer.selectable = false; - noteHoverer.autoAlpha = false; + noteHoverer.snappedToStrumline = noteHoverer.selectable = noteHoverer.autoAlpha = false; + @:privateAccess noteHoverer.__animSpeed = 1.25; selectionBox.cameras = notesGroup.cameras = gridBackdrops.cameras = noteHoverer.cameras = [charterCamera]; @@ -430,8 +429,9 @@ class Charter extends UIState { strumLines.cameras = [charterCamera]; addEventSpr = new CharterEventAdd(); - addEventSpr.alpha = 0; + addEventSpr.x -= addEventSpr.bWidth; addEventSpr.cameras = [charterCamera]; + addEventSpr.alpha = 0; // adds grid and notes so that they're ALWAYS behind the UI add(gridBackdrops); @@ -743,7 +743,7 @@ class Charter extends UIState { } else addEventSpr.sprAlpha = lerp(addEventSpr.sprAlpha, 0, 0.25); // Note Hoverer - if (mousePos.x > 0 && mousePos.x < gridBackdrops.strumlinesAmount * 160 && selection.length == 0) { + if (mousePos.x > 0 && mousePos.x < gridBackdrops.strumlinesAmount * 160 && (mousePos.y > 0 && mousePos.y < (__endStep)*40) && selection.length == 0) { var gridmult = 40 / (noteSnap / 16); noteHoverer.alpha = lerp(noteHoverer.alpha, 0.35, 0.25); if (noteHoverer.id != Math.floor(mousePos.x / 40) % 4) @@ -752,7 +752,7 @@ class Charter extends UIState { noteHoverer.step = FlxMath.bound(FlxG.keys.pressed.SHIFT ? ((mousePos.y-20) / 40) : snap(mousePos.y, gridmult) / 40, 0, __endStep-1); noteHoverer.y = noteHoverer.step * 40; } - noteHoverer.x = Math.floor(mousePos.x / 40) * 40; + noteHoverer.x = lerp(noteHoverer.x, Math.floor(mousePos.x / 40) * 40, .65); } else noteHoverer.alpha = lerp(noteHoverer.alpha, 0, 0.25); } diff --git a/source/funkin/editors/charter/CharterNote.hx b/source/funkin/editors/charter/CharterNote.hx index abc50a2c..68e3689f 100644 --- a/source/funkin/editors/charter/CharterNote.hx +++ b/source/funkin/editors/charter/CharterNote.hx @@ -20,6 +20,7 @@ class CharterNote extends UISprite implements ICharterSelectable { public var sustainSpr:FlxSprite; public var noteTypeText:flixel.text.FlxText; var __doAnim:Bool = false; + var __animSpeed:Float = 1; public var selected:Bool = false; public var draggable:Bool = true; @@ -104,7 +105,7 @@ class CharterNote extends UISprite implements ICharterSelectable { if(angleTween != null) angleTween.cancel(); - angleTween = FlxTween.tween(this, {angle: destAngle}, 2/3, {ease: function(t) { + angleTween = FlxTween.tween(this, {angle: destAngle}, (2/3)/__animSpeed, {ease: function(t) { return ((Math.sin(t * Math.PI) * 0.35) * 3 * t * Math.sqrt(1 - t)) + t; }}); }