Question
ZoomAnimationImage End Callback
Hello, I am trying to zoom/pan back and forward continuosly a logo, using ZoomAnimationImage. I need to trigger a callback at the end of the animation in order to reverse/reload animation. I managed to create my callback but it never gets called.
Here are my WelcomeScreenView.hpp/cpp:
#include <touchgfx/containers/ZoomAnimationImage.hpp>
class WelcomeScreenView : public WelcomeScreenViewBase
....
protected:
virtual void ZoomMoveLogo();
/*
* Interaction Handlers
*/
void liveLogoAnimationEndedCallbackHandler(const touchgfx::ZoomAnimationImage& i);
//void liveLogoAnimationEndedCallbackHandler(const touchgfx::GenericCallback<touchgfx::ZoomAnimationImage>& i);
/*
* Callback Handler Declarations
*/
/*
* Interaction Callback Declarations
*/
Callback < WelcomeScreenView, const touchgfx::ZoomAnimationImage&> liveLogoAnimationEndedCallback;
/*
* Member Declarations
*/
touchgfx::ZoomAnimationImage liveLogo;My WelcomeScreenView.cpp:
WelcomeScreenView::WelcomeScreenView():
liveLogoAnimationEndedCallback(this, &WelcomeScreenView::liveLogoAnimationEndedCallbackHandler)
...
void WelcomeScreenView::setupScreen()
{
WelcomeScreenViewBase::setupScreen();
liveLogo.setPosition(0, 0, 480, 272);
liveLogo.setVisible(true);
liveLogo.setBitmaps (Bitmap(BITMAP_LOGO100X55_ID), Bitmap(BITMAP_LOGO480272_ID));
liveLogo.setAnimationDelay (100);
}
....
void WelcomeScreenView::liveLogoAnimationEndedCallbackHandler(const touchgfx::ZoomAnimationImage& i)
{
// Never called
}
void WelcomeScreenView::ZoomMoveLogo()
{
liveLogo.startZoomAndMoveAnimation (
240 - 50, 244 - 28, 100, 56,
100);
liveLogo.setAnimationEndedCallback (liveLogoAnimationEndedCallback);
}Any idea/suggestion ? Thank you
Paolo
