#include "shared/view.h"
#include <dali-toolkit/dali-toolkit.h>
-
+#include <dali-toolkit/devel-api/controls/magnifier/magnifier.h>
using namespace Dali;
namespace
Stage::GetCurrent().Add(overlay);
mMagnifier = Toolkit::Magnifier::New();
- mMagnifier.SetSourceActor( mView.GetBackgroundLayer() );
+ mMagnifier.SetSourceActor( mView.GetChildAt( 0 ) );
mMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
mMagnifier.SetMagnificationFactor( MAGNIFICATION_FACTOR );
mMagnifier.SetScale(Vector3::ZERO);
// Create bouncing magnifier automatically bounces around screen.
mBouncingMagnifier = Toolkit::Magnifier::New();
- mBouncingMagnifier.SetSourceActor( mView.GetBackgroundLayer() );
+ mBouncingMagnifier.SetSourceActor( mView.GetChildAt( 0 ) );
mBouncingMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
mBouncingMagnifier.SetMagnificationFactor( MAGNIFICATION_FACTOR );
overlay.Add( mBouncingMagnifier );
if(!mMagnifierShown)
{
Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION);
- animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ONE, AlphaFunctions::EaseIn);
+ animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ONE, AlphaFunction::EASE_IN);
animation.Play();
mMagnifierShown = true;
}
if(mMagnifierShown)
{
Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION);
- animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ZERO, AlphaFunctions::EaseOut);
+ animation.AnimateTo(Property(mMagnifier, Actor::Property::SCALE), Vector3::ZERO, AlphaFunction::EASE_OUT);
animation.Play();
mMagnifierShown = false;
}
private:
Application& mApplication; ///< Application instance
- Toolkit::View mView; ///< The view
+ Toolkit::Control mView; ///< The view
Layer mContent; ///< The content layer
Toolkit::Magnifier mMagnifier; ///< The manually controlled magnifier
Toolkit::Magnifier mBouncingMagnifier; ///< The animating magnifier (swirly animation)