*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
-const char* BACKGROUND_IMAGE( DALI_IMAGE_DIR "background-magnifier.jpg" );
-const char* TOOLBAR_IMAGE( DALI_IMAGE_DIR "top-bar.png" );
+const char* BACKGROUND_IMAGE( DEMO_IMAGE_DIR "background-magnifier.jpg" );
+const char* TOOLBAR_IMAGE( DEMO_IMAGE_DIR "top-bar.png" );
const char* APPLICATION_TITLE( "Magnifier Example" );
const Vector3 MAGNIFIER_SIZE(0.25f, 0.25f, 0.0f); ///< Magnifier sides should be 25% of the width of the stage
const float ANIMATION_DURATION(60.0f); ///< Run animation for a minute before repeating.
const char* APPLICATION_TITLE( "Magnifier Example" );
const Vector3 MAGNIFIER_SIZE(0.25f, 0.25f, 0.0f); ///< Magnifier sides should be 25% of the width of the stage
const float ANIMATION_DURATION(60.0f); ///< Run animation for a minute before repeating.
Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
mStageSize = Stage::GetCurrent().GetSize();
Stage::GetCurrent().KeyEventSignal().Connect(this, &ExampleController::OnKeyEvent);
mStageSize = Stage::GetCurrent().GetSize();
// Create bouncing magnifier automatically bounces around screen.
mBouncingMagnifier = Toolkit::Magnifier::New();
// Create bouncing magnifier automatically bounces around screen.
mBouncingMagnifier = Toolkit::Magnifier::New();
- constraint = Constraint::New<Vector3>( mBouncingMagnifier, mBouncingMagnifier.GetPropertyIndex( Toolkit::Magnifier::SOURCE_POSITION_PROPERTY_NAME ), MagnifierPathConstraint(mStageSize) );
+ constraint = Constraint::New<Vector3>( mBouncingMagnifier, Toolkit::Magnifier::Property::SOURCE_POSITION, MagnifierPathConstraint(mStageSize) );
constraint.AddSource( LocalSource(Actor::Property::SIZE) );
constraint.AddSource( LocalSource(mAnimationTimeProperty) );
constraint.Apply();
constraint.AddSource( LocalSource(Actor::Property::SIZE) );
constraint.AddSource( LocalSource(mAnimationTimeProperty) );
constraint.Apply();
// position magnifier glass such that bottom edge is touching/near top of finger.
Vector3 glassPosition(position);
// position magnifier glass such that bottom edge is touching/near top of finger.
Vector3 glassPosition(position);