From 41cb3d93b2b79240f001f980a8ea1931219abd29 Mon Sep 17 00:00:00 2001
From: Cameron Taylor <cameron.taylor.ninja@gmail.com>
Date: Sat, 17 Feb 2024 04:01:06 -0500
Subject: [PATCH] nicer color tweens

---
 source/funkin/ui/story/StoryMenuState.hx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/source/funkin/ui/story/StoryMenuState.hx b/source/funkin/ui/story/StoryMenuState.hx
index 54e16e917..42b55f9cb 100644
--- a/source/funkin/ui/story/StoryMenuState.hx
+++ b/source/funkin/ui/story/StoryMenuState.hx
@@ -590,7 +590,9 @@ class StoryMenuState extends MusicBeatState
         {
           // Both the previous and current level were simple backgrounds.
           // Fade between colors directly, rather than fading one background out and another in.
-          FlxTween.color(levelBackground, 0.4, previousColor, currentColor);
+          // cancels potential tween in progress, and tweens from there
+          FlxTween.cancelTweensOf(levelBackground);
+          FlxTween.color(levelBackground, 0.9, levelBackground.color, currentColor, {ease: FlxEase.quartOut});
         }
         else
         {