Commit ef4c6564a6f1dbf4e3e2d2a4a43f3b3616b359fc
1 parent
547dbafe
Property refactor in dali-core: Demo changes for compiling
Change-Id: Ie3085ce4986965da3743efc9ab6585176d0cdb23
Showing
14 changed files
with
58 additions
and
58 deletions
demo/dali-table-view.cpp
| ... | ... | @@ -262,7 +262,7 @@ void DaliTableView::Initialize( Application& application ) |
| 262 | 262 | mScrollView.SetParentOrigin( ParentOrigin::CENTER ); |
| 263 | 263 | // Note: Currently, changing mScrollView to use SizeMode RELATIVE_TO_PARENT |
| 264 | 264 | // will cause scroll ends to appear in the wrong position. |
| 265 | - mScrollView.ApplyConstraint( Dali::Constraint::New<Dali::Vector3>( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::RelativeToConstraint( SCROLLVIEW_RELATIVE_SIZE ) ) ); | |
| 265 | + mScrollView.ApplyConstraint( Dali::Constraint::New<Dali::Vector3>( Dali::Actor::Property::Size, Dali::ParentSource( Dali::Actor::Property::Size ), Dali::RelativeToConstraint( SCROLLVIEW_RELATIVE_SIZE ) ) ); | |
| 266 | 266 | mScrollView.SetAxisAutoLock( true ); |
| 267 | 267 | mScrollView.ScrollCompletedSignal().Connect( this, &DaliTableView::OnScrollComplete ); |
| 268 | 268 | mScrollView.ScrollStartedSignal().Connect( this, &DaliTableView::OnScrollStart ); |
| ... | ... | @@ -733,9 +733,9 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count, BufferImage dis |
| 733 | 733 | dfActor.SetPosition( actorPos ); |
| 734 | 734 | |
| 735 | 735 | // Define bubble horizontal parallax and vertical wrapping |
| 736 | - Constraint animConstraint = Constraint::New < Vector3 > ( Actor::POSITION, | |
| 736 | + Constraint animConstraint = Constraint::New < Vector3 > ( Actor::Property::Position, | |
| 737 | 737 | Source( mScrollView, mScrollView.GetPropertyIndex( ScrollView::SCROLL_POSITION_PROPERTY_NAME ) ), |
| 738 | - Dali::ParentSource( Dali::Actor::SIZE ), | |
| 738 | + Dali::ParentSource( Dali::Actor::Property::Size ), | |
| 739 | 739 | AnimateBubbleConstraint( actorPos, Random::Range( -0.85f, 0.25f ), randSize ) ); |
| 740 | 740 | dfActor.ApplyConstraint( animConstraint ); |
| 741 | 741 | |
| ... | ... | @@ -746,7 +746,7 @@ void DaliTableView::AddBackgroundActors( Actor layer, int count, BufferImage dis |
| 746 | 746 | Vector3 toPos( actorPos ); |
| 747 | 747 | toPos.y -= ( size.y + randSize ); |
| 748 | 748 | keyframes.Add( 1.0f, toPos ); |
| 749 | - animation.AnimateBetween( Property( dfActor, Actor::POSITION ), keyframes ); | |
| 749 | + animation.AnimateBetween( Property( dfActor, Actor::Property::Position ), keyframes ); | |
| 750 | 750 | animation.SetLooping( true ); |
| 751 | 751 | animation.Play(); |
| 752 | 752 | mBackgroundAnimations.push_back( animation ); | ... | ... |
examples/blocks/blocks-example.cpp
| ... | ... | @@ -348,7 +348,7 @@ private: |
| 348 | 348 | mPaddleImage.SetSize( mPaddleFullSize ); |
| 349 | 349 | |
| 350 | 350 | mWobbleProperty = mPaddle.RegisterProperty(WOBBLE_PROPERTY_NAME, 0.0f); |
| 351 | - Constraint wobbleConstraint = Constraint::New<Quaternion>( Actor::ROTATION, | |
| 351 | + Constraint wobbleConstraint = Constraint::New<Quaternion>( Actor::Property::Rotation, | |
| 352 | 352 | LocalSource(mWobbleProperty), |
| 353 | 353 | WobbleConstraint(10.0f)); |
| 354 | 354 | mPaddle.ApplyConstraint(wobbleConstraint); |
| ... | ... | @@ -361,16 +361,16 @@ private: |
| 361 | 361 | const float margin(BALL_SIZE.width * stageSize.width * 0.5f); |
| 362 | 362 | |
| 363 | 363 | // Set up notifications for ball's collisions against walls. |
| 364 | - PropertyNotification leftNotification = mBall.AddPropertyNotification( Actor::POSITION_X, LessThanCondition(margin) ); | |
| 364 | + PropertyNotification leftNotification = mBall.AddPropertyNotification( Actor::Property::PositionX, LessThanCondition(margin) ); | |
| 365 | 365 | leftNotification.NotifySignal().Connect( this, &ExampleController::OnHitLeftWall ); |
| 366 | 366 | |
| 367 | - PropertyNotification rightNotification = mBall.AddPropertyNotification( Actor::POSITION_X, GreaterThanCondition(stageSize.width - margin) ); | |
| 367 | + PropertyNotification rightNotification = mBall.AddPropertyNotification( Actor::Property::PositionX, GreaterThanCondition(stageSize.width - margin) ); | |
| 368 | 368 | rightNotification.NotifySignal().Connect( this, &ExampleController::OnHitRightWall ); |
| 369 | 369 | |
| 370 | - PropertyNotification topNotification = mBall.AddPropertyNotification( Actor::POSITION_Y, LessThanCondition(margin) ); | |
| 370 | + PropertyNotification topNotification = mBall.AddPropertyNotification( Actor::Property::PositionY, LessThanCondition(margin) ); | |
| 371 | 371 | topNotification.NotifySignal().Connect( this, &ExampleController::OnHitTopWall ); |
| 372 | 372 | |
| 373 | - PropertyNotification bottomNotification = mBall.AddPropertyNotification( Actor::POSITION_Y, GreaterThanCondition(stageSize.height + margin) ); | |
| 373 | + PropertyNotification bottomNotification = mBall.AddPropertyNotification( Actor::Property::PositionY, GreaterThanCondition(stageSize.height + margin) ); | |
| 374 | 374 | bottomNotification.NotifySignal().Connect( this, &ExampleController::OnHitBottomWall ); |
| 375 | 375 | |
| 376 | 376 | // Set up notification for ball colliding against paddle. |
| ... | ... | @@ -378,10 +378,10 @@ private: |
| 378 | 378 | stage.Add(delegate); |
| 379 | 379 | Property::Index property = delegate.RegisterProperty(COLLISION_PROPERTY_NAME, Vector3::ZERO); |
| 380 | 380 | Constraint constraint = Constraint::New<Vector3>( property, |
| 381 | - Source(mBall, Actor::POSITION), | |
| 382 | - Source(mPaddle, Actor::POSITION), | |
| 383 | - Source(mBall, Actor::SIZE), | |
| 384 | - Source(mPaddle, Actor::SIZE), | |
| 381 | + Source(mBall, Actor::Property::Position), | |
| 382 | + Source(mPaddle, Actor::Property::Position), | |
| 383 | + Source(mBall, Actor::Property::Size), | |
| 384 | + Source(mPaddle, Actor::Property::Size), | |
| 385 | 385 | CollisionCircleRectangleConstraint( -Vector3(0.0f, mPaddleHitMargin.height * 0.575f, 0.0f),-Vector3(mPaddleHitMargin) )); |
| 386 | 386 | delegate.ApplyConstraint(constraint); |
| 387 | 387 | |
| ... | ... | @@ -601,10 +601,10 @@ private: |
| 601 | 601 | // Add a constraint on the brick between it and the ball generating a collision-property |
| 602 | 602 | Property::Index property = brick.RegisterProperty(COLLISION_PROPERTY_NAME, Vector3::ZERO); |
| 603 | 603 | Constraint constraint = Constraint::New<Vector3>( property, |
| 604 | - Source(mBall, Actor::POSITION), | |
| 605 | - Source(brick, Actor::POSITION), | |
| 606 | - Source(mBall, Actor::SIZE), | |
| 607 | - Source(brick, Actor::SIZE), | |
| 604 | + Source(mBall, Actor::Property::Position), | |
| 605 | + Source(brick, Actor::Property::Position), | |
| 606 | + Source(mBall, Actor::Property::Size), | |
| 607 | + Source(brick, Actor::Property::Size), | |
| 608 | 608 | CollisionCircleRectangleConstraint(BRICK_COLLISION_MARGIN)); |
| 609 | 609 | brick.ApplyConstraint(constraint); |
| 610 | 610 | |
| ... | ... | @@ -641,7 +641,7 @@ private: |
| 641 | 641 | } |
| 642 | 642 | |
| 643 | 643 | mBallAnimation = Animation::New(MAX_ANIMATION_DURATION); |
| 644 | - mBallAnimation.AnimateBy( Property( mBall, Actor::POSITION ), mBallVelocity * MAX_ANIMATION_DURATION); | |
| 644 | + mBallAnimation.AnimateBy( Property( mBall, Actor::Property::Position ), mBallVelocity * MAX_ANIMATION_DURATION); | |
| 645 | 645 | mBallAnimation.Play(); |
| 646 | 646 | } |
| 647 | 647 | |
| ... | ... | @@ -663,8 +663,8 @@ private: |
| 663 | 663 | |
| 664 | 664 | mDragActor = actor; |
| 665 | 665 | mDragAnimation = Animation::New(0.25f); |
| 666 | - mDragAnimation.AnimateTo( Property(mDragActor, Actor::SCALE), Vector3(1.1f, 1.1f, 1.0f), AlphaFunctions::EaseOut); | |
| 667 | - mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::COLOR), Vector4(1.0f, 1.0f, 1.0f, 0.0f), AlphaFunctions::EaseOut); | |
| 666 | + mDragAnimation.AnimateTo( Property(mDragActor, Actor::Property::Scale), Vector3(1.1f, 1.1f, 1.0f), AlphaFunctions::EaseOut); | |
| 667 | + mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::Property::Color), Vector4(1.0f, 1.0f, 1.0f, 0.0f), AlphaFunctions::EaseOut); | |
| 668 | 668 | mDragAnimation.Play(); |
| 669 | 669 | } |
| 670 | 670 | } |
| ... | ... | @@ -689,8 +689,8 @@ private: |
| 689 | 689 | if(point.state==TouchPoint::Up) // Stop dragging |
| 690 | 690 | { |
| 691 | 691 | mDragAnimation = Animation::New(0.25f); |
| 692 | - mDragAnimation.AnimateTo( Property(mDragActor, Actor::SCALE), Vector3(1.0f, 1.0f, 1.0f), AlphaFunctions::EaseIn); | |
| 693 | - mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f), AlphaFunctions::EaseOut); | |
| 692 | + mDragAnimation.AnimateTo( Property(mDragActor, Actor::Property::Scale), Vector3(1.0f, 1.0f, 1.0f), AlphaFunctions::EaseIn); | |
| 693 | + mDragAnimation.AnimateTo( Property(mPaddleHandle, Actor::Property::Color), Vector4(1.0f, 1.0f, 1.0f, 1.0f), AlphaFunctions::EaseOut); | |
| 694 | 694 | mDragAnimation.Play(); |
| 695 | 695 | mDragActor.Reset(); |
| 696 | 696 | } |
| ... | ... | @@ -747,8 +747,8 @@ private: |
| 747 | 747 | mBallVelocity = Vector3::ZERO; |
| 748 | 748 | |
| 749 | 749 | Animation shrink = Animation::New(0.5f); |
| 750 | - shrink.AnimateTo( Property(mPaddle, Actor::SIZE_WIDTH), mPaddleFullSize.x * f + mPaddleHitMargin.x); | |
| 751 | - shrink.AnimateTo( Property(mPaddleImage, Actor::SIZE_WIDTH), mPaddleFullSize.x * f ); | |
| 750 | + shrink.AnimateTo( Property(mPaddle, Actor::Property::SizeWidth), mPaddleFullSize.x * f + mPaddleHitMargin.x); | |
| 751 | + shrink.AnimateTo( Property(mPaddleImage, Actor::Property::SizeWidth), mPaddleFullSize.x * f ); | |
| 752 | 752 | |
| 753 | 753 | shrink.FinishedSignal().Connect( this, &ExampleController::OnPaddleShrunk ); |
| 754 | 754 | shrink.Play(); |
| ... | ... | @@ -765,7 +765,7 @@ private: |
| 765 | 765 | mBall.SetPosition( mBallStartPosition ); |
| 766 | 766 | mBall.SetColor( Vector4(1.0f, 1.0f, 1.0f, 0.1f) ); |
| 767 | 767 | Animation appear = Animation::New(0.5f); |
| 768 | - appear.AnimateTo( Property(mBall, Actor::COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f) ); | |
| 768 | + appear.AnimateTo( Property(mBall, Actor::Property::Color), Vector4(1.0f, 1.0f, 1.0f, 1.0f) ); | |
| 769 | 769 | appear.Play(); |
| 770 | 770 | |
| 771 | 771 | if(!mLives) |
| ... | ... | @@ -832,7 +832,7 @@ private: |
| 832 | 832 | |
| 833 | 833 | // fade brick (destroy) |
| 834 | 834 | Animation destroyAnimation = Animation::New(0.5f); |
| 835 | - destroyAnimation.AnimateTo( Property( brick, Actor::COLOR_ALPHA ), 0.0f, AlphaFunctions::EaseIn ); | |
| 835 | + destroyAnimation.AnimateTo( Property( brick, Actor::Property::ColorAlpha ), 0.0f, AlphaFunctions::EaseIn ); | |
| 836 | 836 | destroyAnimation.Play(); |
| 837 | 837 | destroyAnimation.FinishedSignal().Connect( this, &ExampleController::OnBrickDestroyed ); |
| 838 | 838 | mDestroyAnimationMap[destroyAnimation] = brick; | ... | ... |
examples/cluster/cluster-example.cpp
| ... | ... | @@ -707,7 +707,7 @@ public: |
| 707 | 707 | Vector2 shearCenter( Vector2(position.x + size.width * shearAnchor.x, position.y + size.height * shearAnchor.y) ); |
| 708 | 708 | Property::Index centerProperty = shaderEffect.GetPropertyIndex(shaderEffect.GetCenterPropertyName()); |
| 709 | 709 | Constraint constraint = Constraint::New<Vector2>( centerProperty, |
| 710 | - Source(mView, Actor::SIZE), | |
| 710 | + Source(mView, Actor::Property::Size), | |
| 711 | 711 | ShearEffectCenterConstraint(stageSize, shearCenter) ); |
| 712 | 712 | shaderEffect.ApplyConstraint(constraint); |
| 713 | 713 | |
| ... | ... | @@ -720,12 +720,12 @@ public: |
| 720 | 720 | |
| 721 | 721 | constraint = Constraint::New<float>( angleXAxisProperty, |
| 722 | 722 | Source(mScrollView, scrollOvershootProperty), |
| 723 | - Source(mView, Actor::ROTATION), | |
| 723 | + Source(mView, Actor::Property::Rotation), | |
| 724 | 724 | ShearEffectConstraint(stageSize, SHEAR_EFFECT_MAX_OVERSHOOT, Vector2::XAXIS) ); |
| 725 | 725 | shaderEffect.ApplyConstraint(constraint); |
| 726 | 726 | constraint = Constraint::New<float>( angleYAxisProperty, |
| 727 | 727 | Source(mScrollView, scrollOvershootProperty), |
| 728 | - Source(mView, Actor::ROTATION), | |
| 728 | + Source(mView, Actor::Property::Rotation), | |
| 729 | 729 | ShearEffectConstraint(stageSize, SHEAR_EFFECT_MAX_OVERSHOOT, Vector2::YAXIS) ); |
| 730 | 730 | shaderEffect.ApplyConstraint(constraint); |
| 731 | 731 | |
| ... | ... | @@ -752,7 +752,7 @@ public: |
| 752 | 752 | |
| 753 | 753 | Property::Index anglePerUnit = shaderEffect.GetPropertyIndex( shaderEffect.GetAnglePerUnitPropertyName() ); |
| 754 | 754 | shaderEffect.ApplyConstraint( Constraint::New<Vector2>( anglePerUnit, |
| 755 | - Source(mView, Actor::ROTATION), | |
| 755 | + Source(mView, Actor::Property::Rotation), | |
| 756 | 756 | CarouselEffectOrientationConstraint( angleSweep ) ) ); |
| 757 | 757 | |
| 758 | 758 | break; |
| ... | ... | @@ -779,7 +779,7 @@ public: |
| 779 | 779 | // dont apply shader effect to scrollview as it might override internal shaders for bounce effect etc |
| 780 | 780 | for( std::vector<ClusterInfo>::iterator i = mClusterInfo.begin(); i != mClusterInfo.end(); ++i ) |
| 781 | 781 | { |
| 782 | - Constraint constraint = Constraint::New<float>(Actor::POSITION_Z, SphereEffectOffsetConstraint(SPHERE_EFFECT_POSITION_Z)); | |
| 782 | + Constraint constraint = Constraint::New<float>(Actor::Property::PositionZ, SphereEffectOffsetConstraint(SPHERE_EFFECT_POSITION_Z)); | |
| 783 | 783 | constraint.SetRemoveAction(Constraint::Discard); |
| 784 | 784 | Cluster cluster = i->mCluster; |
| 785 | 785 | SetShaderEffectRecursively( cluster, shaderEffect ); | ... | ... |
examples/cube-transition-effect/cube-transition-effect-example.cpp
| ... | ... | @@ -264,7 +264,7 @@ void CubeTransitionApp::OnInit( Application& application ) |
| 264 | 264 | mViewTimer.TickSignal().Connect( this, &CubeTransitionApp::OnTimerTick ); |
| 265 | 265 | |
| 266 | 266 | // show the first image |
| 267 | - mImageConstraint = Constraint::New<Vector3>( Actor::SCALE, LocalSource( Actor::SIZE ), ParentSource( Actor::SIZE ), ScaleToFitKeepAspectRatioConstraint() ); | |
| 267 | + mImageConstraint = Constraint::New<Vector3>( Actor::Property::Scale, LocalSource( Actor::Property::Size ), ParentSource( Actor::Property::Size ), ScaleToFitKeepAspectRatioConstraint() ); | |
| 268 | 268 | |
| 269 | 269 | mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) ); |
| 270 | 270 | mCurrentImage.SetPositionInheritanceMode( USE_PARENT_POSITION ); | ... | ... |
examples/dissolve-effect/dissolve-effect-example.cpp
| ... | ... | @@ -232,7 +232,7 @@ void DissolveEffectApp::OnInit( Application& application ) |
| 232 | 232 | mParent.SetPositionInheritanceMode( USE_PARENT_POSITION ); |
| 233 | 233 | mContent.Add( mParent ); |
| 234 | 234 | |
| 235 | - mSizeConstraint= Constraint::New<Vector3>( Actor::SCALE, LocalSource( Actor::SIZE ), ParentSource( Actor::SIZE ), ScaleToFitKeepAspectRatioConstraint() ); | |
| 235 | + mSizeConstraint= Constraint::New<Vector3>( Actor::Property::Scale, LocalSource( Actor::Property::Size ), ParentSource( Actor::Property::Size ), ScaleToFitKeepAspectRatioConstraint() ); | |
| 236 | 236 | |
| 237 | 237 | // show the first image |
| 238 | 238 | mCurrentImage = ImageActor::New( ResourceImage::New( IMAGES[mIndex] ) ); | ... | ... |
examples/item-view/item-view-example.cpp
| ... | ... | @@ -993,7 +993,7 @@ private: |
| 993 | 993 | text.SetTextAlignment( Dali::Toolkit::Alignment::HorizontalLeft ); |
| 994 | 994 | text.SetStyleToCurrentText( defaultTextStyle ); |
| 995 | 995 | text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y ); |
| 996 | - text.ApplyConstraint( Dali::Constraint::New<float>( Dali::Actor::SIZE_WIDTH, Dali::ParentSource( Dali::Actor::SIZE_WIDTH ), Dali::EqualToConstraint() ) ); | |
| 996 | + text.ApplyConstraint( Dali::Constraint::New<float>( Dali::Actor::Property::SizeWidth, Dali::ParentSource( Dali::Actor::Property::SizeWidth ), Dali::EqualToConstraint() ) ); | |
| 997 | 997 | text.SetZ( -0.9f ); |
| 998 | 998 | slider.Add( text ); |
| 999 | 999 | |
| ... | ... | @@ -1016,7 +1016,7 @@ private: |
| 1016 | 1016 | text.SetTextAlignment( Dali::Toolkit::Alignment::HorizontalLeft ); |
| 1017 | 1017 | text.SetStyleToCurrentText( defaultTextStyle ); |
| 1018 | 1018 | text.SetSize( 0.0f, LABEL_TEXT_SIZE_Y ); |
| 1019 | - text.ApplyConstraint( Dali::Constraint::New<float>( Dali::Actor::SIZE_WIDTH, Dali::ParentSource( Dali::Actor::SIZE_WIDTH ), Dali::EqualToConstraint() ) ); | |
| 1019 | + text.ApplyConstraint( Dali::Constraint::New<float>( Dali::Actor::Property::SizeWidth, Dali::ParentSource( Dali::Actor::Property::SizeWidth ), Dali::EqualToConstraint() ) ); | |
| 1020 | 1020 | textContainer.Add( text ); |
| 1021 | 1021 | |
| 1022 | 1022 | mMenu.Show(); | ... | ... |
examples/magnifier/magnifier-example.cpp
| ... | ... | @@ -240,11 +240,11 @@ public: |
| 240 | 240 | overlay.Add( mMagnifier ); |
| 241 | 241 | |
| 242 | 242 | // Apply constraint to animate the position of the magnifier. |
| 243 | - Constraint constraint = Constraint::New<Vector3>(Actor::POSITION, | |
| 244 | - LocalSource(Actor::SIZE), | |
| 245 | - LocalSource(Actor::PARENT_ORIGIN), | |
| 246 | - LocalSource(Actor::ANCHOR_POINT), | |
| 247 | - ParentSource(Actor::SIZE), | |
| 243 | + Constraint constraint = Constraint::New<Vector3>(Actor::Property::Position, | |
| 244 | + LocalSource(Actor::Property::Size), | |
| 245 | + LocalSource(Actor::Property::ParentOrigin), | |
| 246 | + LocalSource(Actor::Property::AnchorPoint), | |
| 247 | + ParentSource(Actor::Property::Size), | |
| 248 | 248 | ConfinementConstraint(ParentOrigin::CENTER, Vector2::ONE * MAGNIFIER_INDENT, Vector2::ONE * MAGNIFIER_INDENT)); |
| 249 | 249 | constraint.SetRemoveAction(Constraint::Discard); |
| 250 | 250 | mMagnifier.ApplyConstraint( constraint ); |
| ... | ... | @@ -260,15 +260,15 @@ public: |
| 260 | 260 | ContinueAnimation(); |
| 261 | 261 | |
| 262 | 262 | // Apply constraint to animate the position of the magnifier. |
| 263 | - constraint = Constraint::New<Vector3>(Actor::POSITION, | |
| 264 | - LocalSource(Actor::SIZE), | |
| 263 | + constraint = Constraint::New<Vector3>(Actor::Property::Position, | |
| 264 | + LocalSource(Actor::Property::Size), | |
| 265 | 265 | LocalSource(mAnimationTimeProperty), |
| 266 | 266 | MagnifierPathConstraint(mStageSize, mStageSize * 0.5f)); |
| 267 | 267 | mBouncingMagnifier.ApplyConstraint( constraint ); |
| 268 | 268 | |
| 269 | 269 | // Apply constraint to animate the source of the magnifier. |
| 270 | 270 | constraint = Constraint::New<Vector3>(mBouncingMagnifier.GetPropertyIndex( Toolkit::Magnifier::SOURCE_POSITION_PROPERTY_NAME ), |
| 271 | - LocalSource(Actor::SIZE), | |
| 271 | + LocalSource(Actor::Property::Size), | |
| 272 | 272 | LocalSource(mAnimationTimeProperty), |
| 273 | 273 | MagnifierPathConstraint(mStageSize)); |
| 274 | 274 | mBouncingMagnifier.ApplyConstraint( constraint ); |
| ... | ... | @@ -355,7 +355,7 @@ public: |
| 355 | 355 | if(!mMagnifierShown) |
| 356 | 356 | { |
| 357 | 357 | Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION); |
| 358 | - animation.AnimateTo(Property(mMagnifier, Actor::SCALE), Vector3::ONE, AlphaFunctions::EaseIn); | |
| 358 | + animation.AnimateTo(Property(mMagnifier, Actor::Property::Scale), Vector3::ONE, AlphaFunctions::EaseIn); | |
| 359 | 359 | animation.Play(); |
| 360 | 360 | mMagnifierShown = true; |
| 361 | 361 | } |
| ... | ... | @@ -369,7 +369,7 @@ public: |
| 369 | 369 | if(mMagnifierShown) |
| 370 | 370 | { |
| 371 | 371 | Animation animation = Animation::New(MAGNIFIER_DISPLAY_DURATION); |
| 372 | - animation.AnimateTo(Property(mMagnifier, Actor::SCALE), Vector3::ZERO, AlphaFunctions::EaseOut); | |
| 372 | + animation.AnimateTo(Property(mMagnifier, Actor::Property::Scale), Vector3::ZERO, AlphaFunctions::EaseOut); | |
| 373 | 373 | animation.Play(); |
| 374 | 374 | mMagnifierShown = false; |
| 375 | 375 | } | ... | ... |
examples/motion-blur/motion-blur-example.cpp
| ... | ... | @@ -349,7 +349,7 @@ public: |
| 349 | 349 | mActorTapMovementAnimation = Animation::New( animDuration ); |
| 350 | 350 | if ( mMotionBlurImageActor ) |
| 351 | 351 | { |
| 352 | - mActorTapMovementAnimation.AnimateTo( Property(mMotionBlurImageActor, Actor::POSITION), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) ); | |
| 352 | + mActorTapMovementAnimation.AnimateTo( Property(mMotionBlurImageActor, Actor::Property::Position), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) ); | |
| 353 | 353 | } |
| 354 | 354 | mActorTapMovementAnimation.SetEndAction( Animation::Bake ); |
| 355 | 355 | mActorTapMovementAnimation.Play(); | ... | ... |
examples/motion-stretch/motion-stretch-example.cpp
| ... | ... | @@ -261,7 +261,7 @@ public: |
| 261 | 261 | mActorTapMovementAnimation = Animation::New( animDuration ); |
| 262 | 262 | if ( mMotionStretchImageActor ) |
| 263 | 263 | { |
| 264 | - mActorTapMovementAnimation.AnimateTo( Property(mMotionStretchImageActor, Actor::POSITION), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) ); | |
| 264 | + mActorTapMovementAnimation.AnimateTo( Property(mMotionStretchImageActor, Actor::Property::Position), destPos, AlphaFunctions::EaseInOutSine, TimePeriod(animDuration) ); | |
| 265 | 265 | } |
| 266 | 266 | mActorTapMovementAnimation.SetEndAction( Animation::Bake ); |
| 267 | 267 | mActorTapMovementAnimation.Play(); | ... | ... |
examples/radial-menu/radial-sweep-view-impl.cpp
| ... | ... | @@ -362,17 +362,17 @@ void RadialSweepViewImpl::CreateStencil( Degree initialSector ) |
| 362 | 362 | |
| 363 | 363 | // Constrain the vertices of the square mesh to sweep out a sector as the |
| 364 | 364 | // rotation angle is animated. |
| 365 | - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(1, AnimatableVertex::POSITION), | |
| 365 | + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(1, AnimatableVertex::Property::Position), | |
| 366 | 366 | srcStart, srcStart, SquareFanConstraint(0))); |
| 367 | - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(2, AnimatableVertex::POSITION), | |
| 367 | + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(2, AnimatableVertex::Property::Position), | |
| 368 | 368 | srcStart, srcRot, SquareFanConstraint(0))); |
| 369 | - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(3, AnimatableVertex::POSITION), | |
| 369 | + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(3, AnimatableVertex::Property::Position), | |
| 370 | 370 | srcStart, srcRot, SquareFanConstraint(1))); |
| 371 | - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(4, AnimatableVertex::POSITION), | |
| 371 | + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(4, AnimatableVertex::Property::Position), | |
| 372 | 372 | srcStart, srcRot, SquareFanConstraint(2))); |
| 373 | - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(5, AnimatableVertex::POSITION), | |
| 373 | + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(5, AnimatableVertex::Property::Position), | |
| 374 | 374 | srcStart, srcRot, SquareFanConstraint(3))); |
| 375 | - mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(6, AnimatableVertex::POSITION), | |
| 375 | + mMesh.ApplyConstraint(Constraint::New<Vector3>( mMesh.GetPropertyIndex(6, AnimatableVertex::Property::Position), | |
| 376 | 376 | srcStart, srcRot, SquareFanConstraint(4))); |
| 377 | 377 | |
| 378 | 378 | mStencilActor.SetDrawMode( DrawMode::STENCIL ); | ... | ... |
examples/refraction-effect/refraction-effect-example.cpp
| ... | ... | @@ -235,7 +235,7 @@ public: |
| 235 | 235 | handle.SetUniform( "uEffectStrength", 0.f ); |
| 236 | 236 | handle.SetUniform( "uLightIntensity", 2.5f ); |
| 237 | 237 | |
| 238 | - Property::Index index = handle.RegisterProperty( "uSpinAngle", 0.f ); | |
| 238 | + Dali::Property::Index index = handle.RegisterProperty( "uSpinAngle", 0.f ); | |
| 239 | 239 | Constraint constraint = Constraint::New<Vector2>( handle.GetPropertyIndex("uLightSpinOffset"), |
| 240 | 240 | LocalSource(index), |
| 241 | 241 | LightOffsetConstraint(stageSize.x*0.1f)); | ... | ... |
examples/scroll-view/scroll-view-example.cpp
| ... | ... | @@ -210,7 +210,7 @@ public: |
| 210 | 210 | |
| 211 | 211 | // Hack to force screen refresh. |
| 212 | 212 | Animation animation = Animation::New(1.0f); |
| 213 | - animation.AnimateTo(Property(mContentLayer, Actor::POSITION), Vector3::ZERO ); | |
| 213 | + animation.AnimateTo(Property(mContentLayer, Actor::Property::Position), Vector3::ZERO ); | |
| 214 | 214 | animation.Play(); |
| 215 | 215 | } |
| 216 | 216 | ... | ... |
examples/shadow-bone-lighting/shadow-bone-lighting-example.cpp
| ... | ... | @@ -286,9 +286,9 @@ public: |
| 286 | 286 | |
| 287 | 287 | Property::Index angleIndex = mImageActor2.RegisterProperty("angle", Property::Value(30.0f)); |
| 288 | 288 | Source angleSrc( mImageActor2, angleIndex ); |
| 289 | - mImageActor1.ApplyConstraint(Constraint::New<Quaternion>( Actor::ROTATION, angleSrc, | |
| 289 | + mImageActor1.ApplyConstraint(Constraint::New<Quaternion>( Actor::Property::Rotation, angleSrc, | |
| 290 | 290 | RotationConstraint(-1.0f))); |
| 291 | - mImageActor3.ApplyConstraint(Constraint::New<Quaternion>( Actor::ROTATION, angleSrc, | |
| 291 | + mImageActor3.ApplyConstraint(Constraint::New<Quaternion>( Actor::Property::Rotation, angleSrc, | |
| 292 | 292 | RotationConstraint(+1.0f))); |
| 293 | 293 | |
| 294 | 294 | mSceneAnimation = Animation::New(2.5f); | ... | ... |
shared/view.h
| ... | ... | @@ -86,7 +86,7 @@ Dali::Layer CreateToolbar( Dali::Toolkit::ToolBar& toolBar, |
| 86 | 86 | Dali::Layer toolBarLayer = Dali::Layer::New(); |
| 87 | 87 | toolBarLayer.SetAnchorPoint( Dali::AnchorPoint::TOP_CENTER ); |
| 88 | 88 | toolBarLayer.SetParentOrigin( Dali::ParentOrigin::TOP_CENTER ); |
| 89 | - toolBarLayer.ApplyConstraint( Dali::Constraint::New<Dali::Vector3>( Dali::Actor::SIZE, Dali::ParentSource( Dali::Actor::SIZE ), Dali::SourceWidthFixedHeight( style.mToolBarHeight ) ) ); | |
| 89 | + toolBarLayer.ApplyConstraint( Dali::Constraint::New<Dali::Vector3>( Dali::Actor::Property::Size, Dali::ParentSource( Dali::Actor::Property::Size ), Dali::SourceWidthFixedHeight( style.mToolBarHeight ) ) ); | |
| 90 | 90 | toolBarLayer.SetSize( 0.0f, style.mToolBarHeight ); |
| 91 | 91 | |
| 92 | 92 | // Raise tool bar layer to the top. | ... | ... |