[4.0] Add soft shadow to text label demo
[platform/core/uifw/dali-demo.git] / examples / text-label / text-label-example.cpp
index 759a684..ef80ced 100644 (file)
@@ -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;
   }
@@ -582,19 +585,10 @@ private:
   Property::Index mOverrideMixColorIndex;
 };
 
-void RunTest( Application& application )
-{
-  TextLabelExample test( application );
-
-  application.MainLoop();
-}
-
-/** Entry point for Linux & Tizen applications */
 int DALI_EXPORT_API main( int argc, char **argv )
 {
   Application application = Application::New( &argc, &argv, DEMO_THEME_PATH );
-
-  RunTest( application );
-
+  TextLabelExample test( application );
+  application.MainLoop();
   return 0;
 }