Notification.hpp 777 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. static void sendNews(cpp3ds::String title, cpp3ds::String message);
  17. private:
  18. static cpp3ds::Texture m_texture;
  19. static float m_spawnPositionY;
  20. bool m_markForDelete;
  21. TweenEngine::TweenManager m_tweenManager;
  22. float m_destinationY;
  23. };
  24. } // namespace FreeShop
  25. #endif // FREESHOP_NOTIFICATION_HPP