diff --git a/include/hyprutils/animation/AnimatedVariable.hpp b/include/hyprutils/animation/AnimatedVariable.hpp index 87e8302..79357a3 100644 --- a/include/hyprutils/animation/AnimatedVariable.hpp +++ b/include/hyprutils/animation/AnimatedVariable.hpp @@ -271,22 +271,24 @@ namespace Hyprutils { template requires AnimableType - void update(bool warpNow = false) { + SCurveStepResult update(bool warpNow = false) { if (warpNow || m_Value == m_Goal || !enabled()) { warp(true, false); - return; + return SCurveStepResult{.value = 1.F, .finished = true}; } const auto STEP = getCurveStep(); if (STEP.finished) { warp(true, false); - return; + return STEP; } const auto DELTA = m_Goal - m_Begun; m_Value = m_Begun + (DELTA * STEP.value); onUpdate(); + + return STEP; } AnimationContext m_Context;