~dandrader/nux/geis

« back to all changes in this revision

Viewing changes to Nux/AnimatedTextureArea.cpp

* Refactoring Nux timer API: Some cleanup and update were required for the animation framework.. Fixes: . Approved by Jay Taoko.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    mouse_drag.connect(sigc::mem_fun(this, &AnimatedTextureArea::RecvMouseDrag));
38
38
 
39
39
    m_TimerFunctor = new TimerFunctor();
40
 
    m_TimerFunctor->time_expires.connect(sigc::mem_fun(this, &AnimatedTextureArea::TimerNextFrame));
 
40
    m_TimerFunctor->tick.connect(sigc::mem_fun(this, &AnimatedTextureArea::TimerNextFrame));
41
41
  }
42
42
 
43
43
  AnimatedTextureArea::~AnimatedTextureArea()
106
106
      m_TimerHandler = 0;
107
107
    }
108
108
 
109
 
    m_TimerHandler = GetTimer().AddTimerHandler(41, m_TimerFunctor, 0);
 
109
    m_TimerHandler = GetTimer().AddOneShotTimer(41, m_TimerFunctor, 0);
110
110
    QueueDraw();
111
111
  }
112
112
 
128
128
      ObjectPtr<IOpenGLBaseTexture> Texture2D = Texture->m_Texture; //Texture->m_Texture.CastRef<IOpenGLAnimatedTexture>();
129
129
 
130
130
      AnimatedTexture->PresentNextFrame();
131
 
      m_TimerHandler = GetTimer().AddTimerHandler(41, m_TimerFunctor, 0);
 
131
      m_TimerHandler = GetTimer().AddOneShotTimer(41, m_TimerFunctor, 0);
132
132
    }
133
133
 
134
134
    QueueDraw();