X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Ftext-label%2Ftext-label-example.cpp;h=fbb5adb1b7f82a634fdd861383683e24eca38ff9;hb=9a0b1574def735c7a728e0867d163139364ccd18;hp=955466b53b7e5540f8ee326022bc5ac3d3e16018;hpb=f3fe0e59ccd7f00cc0ac48ac187cf3aaa97805cb;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/text-label/text-label-example.cpp b/examples/text-label/text-label-example.cpp index 955466b..fbb5adb 100755 --- a/examples/text-label/text-label-example.cpp +++ b/examples/text-label/text-label-example.cpp @@ -365,7 +365,7 @@ public: case SHADOW : { Vector2 shadowOffset( SHADOW_OFFSET ); // Will be set to zeros if color already set - Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW_COLOR ); + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); Vector4 currentShadowColor; value.Get( currentShadowColor ); @@ -697,13 +697,19 @@ public: } case KEY_S: // Shadow color { - if( Color::BLACK == mLabel.GetProperty( TextLabel::Property::SHADOW_COLOR ) ) + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); + Vector4 shadowColor; + value.Get( shadowColor ); + Property::Map shadowMap; + if( Color::BLACK == shadowColor ) { - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::RED ); + shadowMap.Insert( "color", Color::RED ); + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); } else { - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK ); + shadowMap.Insert( "color", Color::BLACK ); + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); } break; } @@ -715,12 +721,26 @@ public: } case KEY_PLUS: // Increase shadow offset { - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty( TextLabel::Property::SHADOW_OFFSET ) + Vector2( 1.0f, 1.0f ) ); + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); + Vector2 shadowOffset; + value.Get( shadowOffset ); + shadowOffset += Vector2( 1.0f, 1.0f ); + + Property::Map shadowMap; + shadowMap.Insert( "offset", shadowOffset ); + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); break; } case KEY_MINUS: // Decrease shadow offset { - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty( TextLabel::Property::SHADOW_OFFSET ) - Vector2( 1.0f, 1.0f ) ); + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW ); + Vector2 shadowOffset; + value.Get( shadowOffset ); + shadowOffset -= Vector2( 1.0f, 1.0f ); + + Property::Map shadowMap; + shadowMap.Insert( "offset", shadowOffset ); + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); break; }