Notification.hpp 707 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef FREESHOP_NOTIFICATION_HPP
  2. #define FREESHOP_NOTIFICATION_HPP
  3. #include <TweenEngine/TweenManager.h>
  4. #include "GUI/Button.hpp"
  5. #define NOTIFICATION_SPACING 0.f
  6. #define NOTIFICATION_DURATION 5.f
  7. namespace FreeShop {
  8. class Notification: public gui3ds::Button {
  9. public:
  10. Notification();
  11. ~Notification();
  12. void animate();
  13. static void update(float delta);
  14. static void spawn(cpp3ds::String message);
  15. static std::vector<std::unique_ptr<Notification>> notifications;
  16. private:
  17. static cpp3ds::Texture m_texture;
  18. static float m_spawnPositionY;
  19. bool m_markForDelete;
  20. TweenEngine::TweenManager m_tweenManager;
  21. float m_destinationY;
  22. };
  23. } // namespace FreeShop
  24. #endif // FREESHOP_NOTIFICATION_HPP