UIAnimation.h 669 B

1234567891011121314151617181920212223242526
  1. // Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
  2. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  3. // SPDX-License-Identifier: MIT
  4. #pragma once
  5. #include <Jolt/Core/RTTI.h>
  6. class UIElement;
  7. /// Base class for UI element animations
  8. class UIAnimation
  9. {
  10. public:
  11. JPH_DECLARE_RTTI_VIRTUAL_BASE(JPH_NO_EXPORT, UIAnimation)
  12. /// Destructor
  13. virtual ~UIAnimation() = default;
  14. ///@name Interface
  15. virtual void Init(UIElement *inElement) { }
  16. virtual bool Update(UIElement *inElement, float inDeltaTime) { return true; } ///< Returns false when done
  17. virtual void Exit(UIElement *inElement) { }
  18. };
  19. using UIAnimationVector = Array<UIAnimation *>;