@@ -21,7 +21,8 @@ namespace Hyprutils {
2121 ; // m_bDummy = true;
2222 };
2323
24- void create (CAnimationManager*, int , Memory::CWeakPointer<CBaseAnimatedVariable>);
24+ void create (CAnimationManager*, int , Memory::CSharedPointer<CBaseAnimatedVariable>);
25+ void create2 (CAnimationManager*, int , Memory::CWeakPointer<CBaseAnimatedVariable>);
2526 void connectToActive ();
2627 void disconnectFromActive ();
2728
@@ -136,7 +137,8 @@ namespace Hyprutils {
136137 public:
137138 CGenericAnimatedVariable () = default ;
138139
139- void create (const int typeInfo, CAnimationManager* pAnimationManager, Memory::CWeakPointer<CGenericAnimatedVariable<VarType, AnimationContext>> pSelf,
140+ /* Deprecated: use create2 */
141+ void create (const int typeInfo, CAnimationManager* pAnimationManager, Memory::CSharedPointer<CGenericAnimatedVariable<VarType, AnimationContext>> pSelf,
140142 const VarType& initialValue) {
141143 m_Begun = initialValue;
142144 m_Value = initialValue;
@@ -145,6 +147,16 @@ namespace Hyprutils {
145147 CBaseAnimatedVariable::create (pAnimationManager, typeInfo, pSelf);
146148 }
147149
150+ /* Equivalent to create, except that it allows animated variables to be UP's */
151+ void create2 (const int typeInfo, CAnimationManager* pAnimationManager, Memory::CWeakPointer<CGenericAnimatedVariable<VarType, AnimationContext>> pSelf,
152+ const VarType& initialValue) {
153+ m_Begun = initialValue;
154+ m_Value = initialValue;
155+ m_Goal = initialValue;
156+
157+ CBaseAnimatedVariable::create2 (pAnimationManager, typeInfo, pSelf);
158+ }
159+
148160 CGenericAnimatedVariable (const CGenericAnimatedVariable&) = delete ;
149161 CGenericAnimatedVariable (CGenericAnimatedVariable&&) = delete ;
150162 CGenericAnimatedVariable& operator =(const CGenericAnimatedVariable&) = delete ;
0 commit comments