Commit 0f87e4b4d3b632eea835c97160cbc6285652b16c
Committed by
Gerrit Code Review
Merge "Changed blocks example to use ImageView." into devel/master
Showing
1 changed file
with
6 additions
and
7 deletions
examples/blocks/blocks-example.cpp
| @@ -523,7 +523,7 @@ private: | @@ -523,7 +523,7 @@ private: | ||
| 523 | const Vector2 brickSize(BRICK_SIZE * Vector2(stageSize.x, stageSize.x)); | 523 | const Vector2 brickSize(BRICK_SIZE * Vector2(stageSize.x, stageSize.x)); |
| 524 | 524 | ||
| 525 | Image img = ResourceImage::New( BRICK_IMAGE_PATH[type], Dali::ImageDimensions( 128, 64 ), Dali::FittingMode::SCALE_TO_FILL, Dali::SamplingMode::BOX_THEN_LINEAR ); | 525 | Image img = ResourceImage::New( BRICK_IMAGE_PATH[type], Dali::ImageDimensions( 128, 64 ), Dali::FittingMode::SCALE_TO_FILL, Dali::SamplingMode::BOX_THEN_LINEAR ); |
| 526 | - ImageActor brick = ImageActor::New(img); | 526 | + ImageView brick = ImageView::New(img); |
| 527 | brick.SetParentOrigin(ParentOrigin::TOP_LEFT); | 527 | brick.SetParentOrigin(ParentOrigin::TOP_LEFT); |
| 528 | brick.SetAnchorPoint(AnchorPoint::CENTER); | 528 | brick.SetAnchorPoint(AnchorPoint::CENTER); |
| 529 | brick.SetSize( brickSize ); | 529 | brick.SetSize( brickSize ); |
| @@ -551,10 +551,9 @@ private: | @@ -551,10 +551,9 @@ private: | ||
| 551 | * | 551 | * |
| 552 | * @param[in] filename the path of the image. | 552 | * @param[in] filename the path of the image. |
| 553 | */ | 553 | */ |
| 554 | - ImageActor CreateImage(const std::string& filename) | 554 | + ImageView CreateImage(const std::string& filename) |
| 555 | { | 555 | { |
| 556 | - Image img = ResourceImage::New(filename); | ||
| 557 | - ImageActor actor = ImageActor::New(img); | 556 | + ImageView actor = ImageView::New(filename); |
| 558 | actor.SetParentOrigin(ParentOrigin::TOP_LEFT); | 557 | actor.SetParentOrigin(ParentOrigin::TOP_LEFT); |
| 559 | actor.SetAnchorPoint(AnchorPoint::CENTER); | 558 | actor.SetAnchorPoint(AnchorPoint::CENTER); |
| 560 | return actor; | 559 | return actor; |
| @@ -806,13 +805,13 @@ private: | @@ -806,13 +805,13 @@ private: | ||
| 806 | Application& mApplication; ///< Application instance | 805 | Application& mApplication; ///< Application instance |
| 807 | Toolkit::Control mView; ///< The View instance. | 806 | Toolkit::Control mView; ///< The View instance. |
| 808 | Layer mContentLayer; ///< The content layer (contains game actors) | 807 | Layer mContentLayer; ///< The content layer (contains game actors) |
| 809 | - ImageActor mBall; ///< The Moving ball image. | 808 | + ImageView mBall; ///< The Moving ball image. |
| 810 | Vector3 mBallStartPosition; ///< Ball Start position | 809 | Vector3 mBallStartPosition; ///< Ball Start position |
| 811 | Vector3 mBallVelocity; ///< Ball's current direction. | 810 | Vector3 mBallVelocity; ///< Ball's current direction. |
| 812 | Animation mBallAnimation; ///< Ball's animation | 811 | Animation mBallAnimation; ///< Ball's animation |
| 813 | Actor mPaddle; ///< The paddle including hit area. | 812 | Actor mPaddle; ///< The paddle including hit area. |
| 814 | - ImageActor mPaddleImage; ///< The paddle's image. | ||
| 815 | - ImageActor mPaddleHandle; ///< The paddle's handle (where the user touches) | 813 | + ImageView mPaddleImage; ///< The paddle's image. |
| 814 | + ImageView mPaddleHandle; ///< The paddle's handle (where the user touches) | ||
| 816 | Vector2 mPaddleHitMargin; ///< The paddle hit margin. | 815 | Vector2 mPaddleHitMargin; ///< The paddle hit margin. |
| 817 | Animation mWobbleAnimation; ///< Paddle's animation when hit (wobbles) | 816 | Animation mWobbleAnimation; ///< Paddle's animation when hit (wobbles) |
| 818 | Property::Index mWobbleProperty; ///< The wobble property (generated from animation) | 817 | Property::Index mWobbleProperty; ///< The wobble property (generated from animation) |