diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-03-07 16:05:57 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:12:40 +0300 |
commit | 69f6e406743e9bfa4813989cec71d9465b1524e2 (patch) | |
tree | 98ec8f1e4163bcfced4abafcd37499c51401ccd9 /map/compass_arrow.cpp | |
parent | aa9010fa705edb99280619e9e74e04fbff2b0430 (diff) |
new ruler with chess and poetesses
Diffstat (limited to 'map/compass_arrow.cpp')
-rw-r--r-- | map/compass_arrow.cpp | 66 |
1 files changed, 1 insertions, 65 deletions
diff --git a/map/compass_arrow.cpp b/map/compass_arrow.cpp index b2f4cbffcf..45d6f60e7d 100644 --- a/map/compass_arrow.cpp +++ b/map/compass_arrow.cpp @@ -1,9 +1,9 @@ #include "compass_arrow.hpp" #include "framework.hpp" +#include "alfa_animation_task.hpp" #include "../anim/controller.hpp" -#include "../anim/task.hpp" #include "../gui/controller.hpp" @@ -17,70 +17,6 @@ using namespace graphics; -namespace -{ - class AlfaCompassAnim : public anim::Task - { - typedef anim::Task base_t; - public: - AlfaCompassAnim(double start, double end, double timeInterval, double timeOffset, Framework * f) - : m_start(start) - , m_end(end) - , m_current(start) - , m_timeInterval(timeInterval) - , m_timeOffset(timeOffset) - , m_f(f) - { - } - - bool IsHiding() const - { - return m_start > m_end; - } - - float GetCurrentAlfa() const - { - return m_current; - } - - virtual void OnStart(double ts) - { - m_timeStart = ts; - base_t::OnStart(ts); - m_f->Invalidate(); - } - - virtual void OnStep(double ts) - { - base_t::OnStep(ts); - double elapsed = ts - (m_timeStart + m_timeOffset); - if (elapsed >= 0.0) - { - double t = elapsed / m_timeInterval; - if (t > 1.0) - { - m_current = m_end; - End(); - } - else - m_current = m_start + t * (m_end - m_start); - } - - m_f->Invalidate(); - } - - private: - double m_start; - double m_end; - double m_current; - double m_timeInterval; - double m_timeOffset; - double m_timeStart; - - Framework * m_f; - }; -} - CompassArrow::Params::Params() : m_framework(0) {} |