X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Ftext-overlap%2Ftext-overlap-example.cpp;h=7140614d2dcc6d566d8ecccfa6044cd9d6d266f7;hb=refs%2Fchanges%2F46%2F233846%2F1;hp=85d12db6b89db1e4761ab09dbae78ec2c8dbdd55;hpb=58f272e38bad083e89997a37da8b9cfc8ba9b6e1;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/text-overlap/text-overlap-example.cpp b/examples/text-overlap/text-overlap-example.cpp index 85d12db..7140614 100644 --- a/examples/text-overlap/text-overlap-example.cpp +++ b/examples/text-overlap/text-overlap-example.cpp @@ -33,8 +33,8 @@ void TextOverlapController::Create( Application& app ) mLabels[0] = TextLabel::New("Text Label 1"); mLabels[1] = TextLabel::New("Text Label 2"); - mLabels[0].SetName("Label1"); - mLabels[1].SetName("Label2"); + mLabels[0].SetProperty( Dali::Actor::Property::NAME,"Label1"); + mLabels[1].SetProperty( Dali::Actor::Property::NAME,"Label2"); mLabels[0].SetProperty( DevelActor::Property::SIBLING_ORDER, 1 ); mLabels[1].SetProperty( DevelActor::Property::SIBLING_ORDER, 2 ); @@ -45,8 +45,8 @@ void TextOverlapController::Create( Application& app ) for(int i=0; i( Actor::Property::POSITION ); + Vector3 size = mLabels[i].GetCurrentProperty< Vector3 >( Actor::Property::SIZE ); if( gesture.position.y > position.y - size.y * 0.5f && gesture.position.y <= position.y + size.y * 0.5f ) { @@ -92,7 +92,7 @@ void TextOverlapController::OnPan( Actor actor, const PanGesture& gesture ) else if( mGrabbedActor && gesture.state == PanGesture::Continuing ) { Vector2 stageSize = Stage::GetCurrent().GetSize(); - Vector3 size = mGrabbedActor.GetCurrentSize(); + Vector3 size = mGrabbedActor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ); float y = Clamp( gesture.position.y, size.y * 0.5f, stageSize.y - size.y*0.5f ); mGrabbedActor.SetPosition( 0, y ); }