Changes after TouchedSignal changes
[platform/core/uifw/dali-demo.git] / examples / text-field / text-field-example.cpp
index b2478b3..751380b 100644 (file)
@@ -128,7 +128,7 @@ public:
     popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
     popup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::WIDTH );
     popup.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
-    popup.TouchSignal().Connect( this, &TextFieldExample::OnPopupTouched );
+    popup.TouchedSignal().Connect( this, &TextFieldExample::OnPopupTouched );
 
     return popup;
   }
@@ -151,10 +151,10 @@ public:
     mField.Reset();
   }
 
-  bool OnPopupTouched( Actor actor, const TouchData& event )
+  bool OnPopupTouched( Actor actor, const TouchEvent& event )
   {
     // End edit mode for TextField if parent Popup touched.
-    if(event.GetPointCount() > 0)
+    if((event.GetPointCount() > 0) && (mPopup == event.GetHitActor(0)))
     {
       switch( event.GetState( 0 ) )
       {
@@ -177,7 +177,7 @@ public:
       } // end switch
     }
 
-    return true;
+    return false;
   }
 
   /**
@@ -185,7 +185,7 @@ public:
    */
   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 ) )
       {