Alarm.hpp 883 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef CLOCK_ALARM_HPP
  2. #define CLOCK_ALARM_HPP
  3. #include <cpp3ds/Graphics/Drawable.hpp>
  4. #include <cpp3ds/Graphics/Text.hpp>
  5. #include <cpp3ds/Window/Event.hpp>
  6. #include <cpp3ds/System/Clock.hpp>
  7. #include "TweenObjects.hpp"
  8. #include "AlarmItem.hpp"
  9. #include <TweenEngine/Tween.h>
  10. #include <TweenEngine/TweenManager.h>
  11. #ifndef EMULATION
  12. #include <3ds.h>
  13. #endif
  14. namespace Clock {
  15. class Alarm : public cpp3ds::Drawable, public util3ds::TweenTransformable<cpp3ds::Transformable> {
  16. public:
  17. void update(float delta);
  18. void processEvent(const cpp3ds::Event& event);
  19. Alarm();
  20. ~Alarm();
  21. void saveAlarms();
  22. void loadAlarms();
  23. protected:
  24. virtual void draw(cpp3ds::RenderTarget& target, cpp3ds::RenderStates states) const;
  25. private:
  26. std::vector<std::shared_ptr<AlarmItem>> m_alarmItems;
  27. TweenEngine::TweenManager m_tweenManager;
  28. };
  29. } // namespace Clock
  30. #endif // CLOCK_ALARM_HPP