X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fgestures%2Fgesture-example.cpp;h=bd32658356a9cd1631a7d97426cdab3c5f7710ef;hb=1a473d5189ca7e7d55aca3a64a8a4ff2dc3b6c67;hp=e2d8e8a19fd3239c4d232c7bba2856da37ee1e88;hpb=e3080a83ec85e14ec8cbf82831fd73b152c6e86a;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/gestures/gesture-example.cpp b/examples/gestures/gesture-example.cpp index e2d8e8a..bd32658 100644 --- a/examples/gestures/gesture-example.cpp +++ b/examples/gestures/gesture-example.cpp @@ -158,7 +158,7 @@ private: background.Add( touchControl ); // Connect to the touch signal - touchControl.TouchSignal().Connect( this, &GestureExample::OnTouch ); + touchControl.TouchedSignal().Connect( this, &GestureExample::OnTouch ); touchControl.SetProperty( Actor::Property::LEAVE_REQUIRED, true ); // Create a long press gesture detector, attach the actor & connect @@ -266,7 +266,7 @@ private: */ void OnLongPress( Actor actor, const LongPressGesture& longPress ) { - if( longPress.state == Gesture::Started ) + if( longPress.GetState() == Gesture::Started ) { // When we first receive a long press, attach the actor to the pan detector. mPanDetector.Attach( actor ); @@ -294,7 +294,7 @@ private: // As the displacement is in local actor coords, we will have to multiply the displacement by the // actor's scale so that it moves the correct amount in the parent's coordinate system. - Vector3 scaledDisplacement( pan.displacement ); + Vector3 scaledDisplacement( pan.GetDisplacement() ); scaledDisplacement *= actor.GetCurrentProperty< Vector3 >( Actor::Property::SCALE ); Vector3 currentPosition; @@ -303,7 +303,7 @@ private: Vector3 newPosition = currentPosition + scaledDisplacement; actor.SetProperty( Actor::Property::POSITION, newPosition ); - switch( pan.state ) + switch( pan.GetState() ) { case Gesture::Started: { @@ -369,7 +369,7 @@ private: */ void OnPinch( Actor actor, const PinchGesture& pinch ) { - switch( pinch.state ) + switch( pinch.GetState() ) { case Gesture::Started: { @@ -406,7 +406,7 @@ private: } } - actor.SetProperty( Actor::Property::SCALE, mStartingScale * pinch.scale ); + actor.SetProperty( Actor::Property::SCALE, mStartingScale * pinch.GetScale() ); } /** @@ -417,7 +417,7 @@ private: */ void OnRotation( Actor actor, const RotationGesture& rotation ) { - switch( rotation.state ) + switch( rotation.GetState() ) { case Gesture::Started: { @@ -442,7 +442,7 @@ private: } } - actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( mStartingOrientation * Quaternion( rotation.rotation, Vector3::ZAXIS ) ) ); + actor.SetProperty( Actor::Property::ORIENTATION, Quaternion( mStartingOrientation * Quaternion( rotation.GetRotation(), Vector3::ZAXIS ) ) ); } /**