From 91db498b01a41e987826cdb36bbfc2340071f108 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sun, 26 Apr 2026 18:22:52 +0100 Subject: [PATCH] thing --- include/hyprutils/animation/AnimatedVariable.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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;