From 9c2cffcf4ef783aa2b052e73865ed14b4b4907e2 Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Sun, 19 Nov 2023 15:48:14 -0700 Subject: [PATCH] remove angle tween on hoverer --- source/funkin/editors/charter/Charter.hx | 14 +++++++++----- .../editors/charter/CharterStrumlineButton.hx | 8 ++++---- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 293860b6..d142f1dd 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -780,7 +780,7 @@ class Charter extends UIState { if (gridActionType == NONE) { // Event Spr - if (mousePos.x < 0 && mousePos.x > -addEventSpr.bWidth && selection.length == 0) { + if (mousePos.x < 0 && mousePos.x > -addEventSpr.bWidth) { addEventSpr.incorporeal = false; addEventSpr.sprAlpha = lerp(addEventSpr.sprAlpha, 0.75, 0.25); var event = getHoveredEvent(mousePos.y); @@ -789,11 +789,15 @@ class Charter extends UIState { } else addEventSpr.sprAlpha = lerp(addEventSpr.sprAlpha, 0, 0.25); // Note Hoverer - if (mousePos.x > 0 && mousePos.x < gridBackdrops.strumlinesAmount * 160 && (mousePos.y > 0 && mousePos.y < (__endStep)*40) && selection.length == 0) { + if (mousePos.x > 0 && mousePos.x < gridBackdrops.strumlinesAmount * 160 && (mousePos.y > 0 && mousePos.y < (__endStep)*40)) { noteHoverer.alpha = lerp(noteHoverer.alpha, 0.35, 0.25); - if (noteHoverer.id != Math.floor(mousePos.x / 40) % 4) - noteHoverer.updatePos(FlxMath.bound(FlxG.keys.pressed.SHIFT ? ((mousePos.y-20) / 40) : quantStep(mousePos.y/40), 0, __endStep-1), Math.floor(mousePos.x / 40) % 4, 0, null, null); - else { + if (noteHoverer.id != Math.floor(mousePos.x / 40) % 4) { + @:privateAccess noteHoverer.__doAnim = false; // Un comment to restore this + noteHoverer.updatePos( + FlxMath.bound(FlxG.keys.pressed.SHIFT ? ((mousePos.y-20) / 40) : quantStep(mousePos.y/40), 0, __endStep-1), + Math.floor(mousePos.x / 40) % 4, 0, null, null + ); + } else { noteHoverer.step = FlxMath.bound(FlxG.keys.pressed.SHIFT ? ((mousePos.y-20) / 40) : quantStep(mousePos.y/40), 0, __endStep-1); noteHoverer.y = noteHoverer.step * 40; } diff --git a/source/funkin/editors/charter/CharterStrumlineButton.hx b/source/funkin/editors/charter/CharterStrumlineButton.hx index 2cd156cf..c2d8647c 100644 --- a/source/funkin/editors/charter/CharterStrumlineButton.hx +++ b/source/funkin/editors/charter/CharterStrumlineButton.hx @@ -16,7 +16,7 @@ class CharterStrumlineButton extends UISprite { button = new UISprite(); button.loadGraphic(Paths.image(imagePath)); - button.scale.set(0.75,0.75); + button.scale.set(0.85,0.85); button.updateHitbox(); button.antialiasing = false; button.cursor = BUTTON; @@ -30,17 +30,17 @@ class CharterStrumlineButton extends UISprite { var buttonScale:FlxPoint = FlxPoint.get(0,0); public override function update(elapsed:Float) { - button.follow(this, ((40 * 4) - button.width) / 2, 24); + button.follow(this, ((40 * 4) - button.width) / 2, 20); text.follow(this, 0, 84); super.update(elapsed); UIState.state.updateSpriteRect(button); if(UIState.state.isOverlapping(button, button.__rect)) { - buttonScale.set(0.85, 0.85); + buttonScale.set(0.95, 0.95); if (FlxG.mouse.justReleased && onClick != null) onClick(); } - else buttonScale.set(0.75, 0.75); + else buttonScale.set(0.85, 0.85); button.scale.set( FlxMath.lerp(button.scale.x, buttonScale.x, 1/6),