Commit 57ea82ed3dbed79a26f9a1293d98ac779fa7470c

Authored by Richard Huang
1 parent a6dc37d6

Add soft shadow to text label demo

Change-Id: I835a2ac6fd9b77f8295d32f93e79569488958507
examples/text-label/text-label-example.cpp
@@ -303,8 +303,11 @@ public: @@ -303,8 +303,11 @@ public:
303 303
304 mShadowActive = ( shadowOffset == Vector2::ZERO ) ? false : true; 304 mShadowActive = ( shadowOffset == Vector2::ZERO ) ? false : true;
305 305
306 - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, shadowOffset );  
307 - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, mSelectedColor ); 306 + Property::Map shadowMap;
  307 + shadowMap.Insert( "offset", shadowOffset );
  308 + shadowMap.Insert( "color", mSelectedColor );
  309 + shadowMap.Insert( "blurRadius", 2.0f );
  310 + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
308 } 311 }
309 return true; 312 return true;
310 } 313 }