Changes after TouchedSignal changes
[platform/core/uifw/dali-demo.git] / examples / mesh-visual / mesh-visual-example.cpp
index 02fef7e..affde27 100644 (file)
@@ -99,7 +99,7 @@ public:
     //Set up root layer to receive touch gestures.
     Layer rootLayer = window.GetRootLayer();
     rootLayer.RegisterProperty( "Tag", LAYER_TAG ); //Used to differentiate between different kinds of actor.
-    rootLayer.TouchSignal().Connect( this, &MeshVisualController::OnTouch );
+    rootLayer.TouchedSignal().Connect( this, &MeshVisualController::OnTouch );
 
     //Place models on the scene.
     SetupModels( rootLayer );
@@ -124,7 +124,7 @@ public:
       mContainers[i].SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
       mContainers[i].RegisterProperty( "Tag", MODEL_TAG ); //Used to differentiate between different kinds of actor.
       mContainers[i].RegisterProperty( "Model", Property::Value( i ) ); //Used to index into the model.
-      mContainers[i].TouchSignal().Connect( this, &MeshVisualController::OnTouch );
+      mContainers[i].TouchedSignal().Connect( this, &MeshVisualController::OnTouch );
       layer.Add( mContainers[i] );
     }
 
@@ -280,7 +280,7 @@ public:
     SetLightImage();
 
     //Connect to touch signal for dragging.
-    mLightSource.TouchSignal().Connect( this, &MeshVisualController::OnTouch );
+    mLightSource.TouchedSignal().Connect( this, &MeshVisualController::OnTouch );
 
     //Place the light source on a layer above the base, so that it is rendered above everything else.
     Layer upperLayer = Layer::New();
@@ -395,7 +395,7 @@ public:
 
   //If the light source is touched, move it by dragging it.
   //If a model is touched, rotate it by panning around.
-  bool OnTouch( Actor actor, const TouchData& touch )
+  bool OnTouch( Actor actor, const TouchEvent& touch )
   {
     switch( touch.GetState( 0 ) )
     {
@@ -572,7 +572,7 @@ public:
   //If escape or the back button is pressed, quit the application (and return to the launcher)
   void OnKeyEvent( const KeyEvent& event )
   {
-    if( event.state == KeyEvent::Down )
+    if( event.GetState() == KeyEvent::DOWN )
     {
       if( IsKey( event, DALI_KEY_ESCAPE) || IsKey( event, DALI_KEY_BACK ) )
       {