Commit da59bfcfd456ed3db03fb32d4fb7ee8afbe6c7e4

Authored by Kimmo Hoikka
1 parent 68b302df

Remove unnecessary use of ImageActor from bubble-demo

Change-Id: Iba0598878f2816bf2bce28c6daefb9d6ddca1140
examples/bubble-effect/bubble-effect-example.cpp
... ... @@ -100,9 +100,8 @@ private:
100 100 // Creates a default view with a default tool bar.
101 101 // The view is added to the stage.
102 102 Toolkit::ToolBar toolBar;
103   - Toolkit::Control view;
104 103 Layer content = DemoHelper::CreateView( app,
105   - view,
  104 + mBackground,
106 105 toolBar,
107 106 "",
108 107 TOOLBAR_IMAGE,
... ... @@ -140,15 +139,14 @@ private:
140 139 content.Add( bubbleRoot );
141 140  
142 141 // Add the background image actor to stage
143   - view.SetBackgroundImage( mBackgroundImage );
144   - mBackgroundActor = ImageActor::DownCast( view.GetBackgroundActor() );
  142 + mBackground.SetBackgroundImage( mBackgroundImage );
145 143  
146 144 // Set up the timer to emit bubble regularly when the finger is touched down but not moved
147 145 mTimerForBubbleEmission = Timer::New( mTimerInterval );
148 146 mTimerForBubbleEmission.TickSignal().Connect(this, &BubbleEffectExample::OnTimerTick);
149 147  
150 148 // Connect the callback to the touch signal on the background
151   - mBackgroundActor.TouchedSignal().Connect( this, &BubbleEffectExample::OnTouch );
  149 + mBackground.TouchedSignal().Connect( this, &BubbleEffectExample::OnTouch );
152 150 }
153 151  
154 152  
... ... @@ -255,7 +253,7 @@ private:
255 253  
256 254 mBubbleEmitter.SetBackground( mBackgroundImage, mHSVDelta );
257 255  
258   - mBackgroundActor.SetImage( mBackgroundImage );
  256 + mBackground.SetBackgroundImage( mBackgroundImage );
259 257 }
260 258 else if( button == mChangeBubbleShapeButton )
261 259 {
... ... @@ -282,7 +280,7 @@ private:
282 280  
283 281 Application& mApp;
284 282 Image mBackgroundImage;
285   - ImageActor mBackgroundActor;
  283 + Dali::Toolkit::Control mBackground;
286 284  
287 285 Toolkit::BubbleEmitter mBubbleEmitter;
288 286 Vector3 mHSVDelta;
... ...