From 57ea82ed3dbed79a26f9a1293d98ac779fa7470c Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Tue, 24 Oct 2017 16:20:22 +0100 Subject: Add soft shadow to text label demo Change-Id: I835a2ac6fd9b77f8295d32f93e79569488958507 --- examples/text-label/text-label-example.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/text-label/text-label-example.cpp b/examples/text-label/text-label-example.cpp index bb9c36b1..ef80cedb 100644 --- a/examples/text-label/text-label-example.cpp +++ b/examples/text-label/text-label-example.cpp @@ -303,8 +303,11 @@ public: mShadowActive = ( shadowOffset == Vector2::ZERO ) ? false : true; - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, shadowOffset ); - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, mSelectedColor ); + Property::Map shadowMap; + shadowMap.Insert( "offset", shadowOffset ); + shadowMap.Insert( "color", mSelectedColor ); + shadowMap.Insert( "blurRadius", 2.0f ); + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap ); } return true; } -- cgit v1.2.3