From 901a3990ffcc63ee55b8ebb57ac019f39b4a5c45 Mon Sep 17 00:00:00 2001 From: tahmid-23 <60953955+tahmid-23@users.noreply.github.com> Date: Wed, 12 Jul 2023 04:45:17 -0400 Subject: [PATCH] modify gradient --- .../zombies/coin/component/BasicTransactionMessager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zombies/src/main/java/org/phantazm/zombies/coin/component/BasicTransactionMessager.java b/zombies/src/main/java/org/phantazm/zombies/coin/component/BasicTransactionMessager.java index 6bf558445..1091ed1e3 100644 --- a/zombies/src/main/java/org/phantazm/zombies/coin/component/BasicTransactionMessager.java +++ b/zombies/src/main/java/org/phantazm/zombies/coin/component/BasicTransactionMessager.java @@ -76,12 +76,12 @@ private ComponentLike lerpColorRecursive(Component component, float progress) { children.add(lerpColorRecursive(child, progress)); } - TextColor oldColor = component.color(); - if (oldColor == null) { - oldColor = coinsInfo.gradientFrom(); + TextColor toColor = component.color(); + if (toColor == null) { + toColor = coinsInfo.gradientTo(); } - TextColor newColor = TextColor.lerp(progress, oldColor, coinsInfo.gradientTo()); + TextColor newColor = TextColor.lerp(progress, coinsInfo.gradientFrom(), toColor); return component.children(children).color(newColor); }