123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- #ifndef CLOCK_CLOCKITEM_HPP
- #define CLOCK_CLOCKITEM_HPP
- #include <cpp3ds/Graphics/Drawable.hpp>
- #include <cpp3ds/Graphics/Text.hpp>
- #include <cpp3ds/Window/Event.hpp>
- #include <cpp3ds/System/Clock.hpp>
- #include "TweenObjects.hpp"
- #include <TweenEngine/Tween.h>
- #include <TweenEngine/TweenManager.h>
- #ifndef EMULATION
- #include <3ds.h>
- #endif
- namespace Clock {
- class ClockItem : public cpp3ds::Drawable, public util3ds::TweenTransformable<cpp3ds::Transformable> {
- public:
- void update(float delta);
- ClockItem();
- ~ClockItem();
- protected:
- virtual void draw(cpp3ds::RenderTarget& target, cpp3ds::RenderStates states) const;
- private:
- util3ds::TweenRectangleShape m_clockDial;
- util3ds::TweenRectangleShape m_clockScrew;
- util3ds::TweenRectangleShape m_hourHand;
- util3ds::TweenRectangleShape m_minuteHand;
- util3ds::TweenRectangleShape m_secondHand;
- util3ds::TweenText m_textTwelve;
- util3ds::TweenText m_textThree;
- util3ds::TweenText m_textSix;
- util3ds::TweenText m_textNein;
- cpp3ds::Clock m_updateClock;
- TweenEngine::TweenManager m_tweenManager;
- void updateHands();
- };
- } // namespace Clock
- #endif // CLOCK_CLOCKITEM_HPP
|