Remove unnecessary use of ImageActor from bubble-demo 35/39935/1 accepted/tizen/mobile/20150604.121242 accepted/tizen/tv/20150604.121300 accepted/tizen/wearable/20150604.121342 submit/tizen_mobile/20150604.084537 submit/tizen_tv/20150604.084545 submit/tizen_wearable/20150604.084552
authorKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 26 May 2015 15:22:04 +0000 (16:22 +0100)
committerKimmo Hoikka <kimmo.hoikka@samsung.com>
Tue, 26 May 2015 15:22:04 +0000 (16:22 +0100)
Change-Id: Iba0598878f2816bf2bce28c6daefb9d6ddca1140

examples/bubble-effect/bubble-effect-example.cpp

index e34daa9..5e4e304 100644 (file)
@@ -100,9 +100,8 @@ private:
     // Creates a default view with a default tool bar.
     // The view is added to the stage.
     Toolkit::ToolBar toolBar;
-    Toolkit::Control    view;
     Layer content = DemoHelper::CreateView( app,
-                                            view,
+                                            mBackground,
                                             toolBar,
                                             "",
                                             TOOLBAR_IMAGE,
@@ -140,15 +139,14 @@ private:
     content.Add( bubbleRoot );
 
     // Add the background image actor to stage
-    view.SetBackgroundImage( mBackgroundImage );
-    mBackgroundActor = ImageActor::DownCast( view.GetBackgroundActor() );
+    mBackground.SetBackgroundImage( mBackgroundImage );
 
     // Set up the timer to emit bubble regularly when the finger is touched down but not moved
     mTimerForBubbleEmission = Timer::New( mTimerInterval );
     mTimerForBubbleEmission.TickSignal().Connect(this, &BubbleEffectExample::OnTimerTick);
 
     // Connect the callback to the touch signal on the background
-    mBackgroundActor.TouchedSignal().Connect( this, &BubbleEffectExample::OnTouch );
+    mBackground.TouchedSignal().Connect( this, &BubbleEffectExample::OnTouch );
   }
 
 
@@ -255,7 +253,7 @@ private:
 
       mBubbleEmitter.SetBackground( mBackgroundImage, mHSVDelta );
 
-      mBackgroundActor.SetImage( mBackgroundImage );
+      mBackground.SetBackgroundImage( mBackgroundImage );
     }
     else if( button == mChangeBubbleShapeButton )
     {
@@ -282,7 +280,7 @@ private:
 
   Application&               mApp;
   Image                      mBackgroundImage;
-  ImageActor                 mBackgroundActor;
+  Dali::Toolkit::Control     mBackground;
 
   Toolkit::BubbleEmitter     mBubbleEmitter;
   Vector3                    mHSVDelta;