// EXTERNAL INCLUDES
#include <dali/devel-api/object/handle-devel.h>
#include <dali/devel-api/actors/actor-devel.h>
-#include <dali-toolkit/devel-api/controls/text-controls/text-label-devel.h>
#include <dali-toolkit/devel-api/controls/buttons/button-devel.h>
#include <dali-toolkit/dali-toolkit.h>
#include <iostream>
mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
mLabel.SetSize(mLayoutSize);
mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
- mLabel.SetProperty( DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE, Color::GREEN );
+ mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::GREEN );
mLabel.SetBackgroundColor( Color::WHITE );
mContainer.Add( mLabel );
mBorder.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::HEIGHT );
Dali::Property::Map border;
- border.Insert( Visual::Property::TYPE, Visual::BORDER );
+ border.Insert( Toolkit::Visual::Property::TYPE, Visual::BORDER );
border.Insert( BorderVisual::Property::COLOR, Color::WHITE );
border.Insert( BorderVisual::Property::SIZE, 2.f );
mBorder.SetProperty( Control::Property::BACKGROUND, border );
// Animate the text color 3 times from source color to Yellow
Animation animation = Animation::New( 2.f );
- animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::YELLOW, AlphaFunction::SIN );
+ animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), Color::YELLOW, AlphaFunction::SIN );
animation.SetLoopCount( 3 );
animation.Play();
if( button == mStyleButtons[ StyleType::TEXT_COLOR ] )
{
Animation animation = Animation::New( 2.f );
- animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), mSelectedColor, AlphaFunction::LINEAR );
+ animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), mSelectedColor, AlphaFunction::LINEAR );
animation.Play();
}
else if( button == mStyleButtons[ StyleType::OUTLINE ] )
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;
}
mColorButtons[index].SetProperty( Toolkit::DevelButton::Property::SELECTED_BACKGROUND_VISUAL, propertyMap );
mColorButtons[index].SetProperty( Toolkit::DevelButton::Property::SELECTED_VISUAL,
- Property::Map().Add( Visual::Property::TYPE, Visual::BORDER )
+ Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::BORDER )
.Add( BorderVisual::Property::COLOR, Color::WHITE )
.Add( BorderVisual::Property::SIZE, 2.0f )
.Add( BorderVisual::Property::ANTI_ALIASING, true ) );
case KEY_A: // Animate text colour
{
Animation animation = Animation::New( 2.f );
- animation.AnimateTo( Property( mLabel, DevelTextLabel::Property::TEXT_COLOR_ANIMATABLE ), Color::RED, AlphaFunction::SIN );
+ animation.AnimateTo( Property( mLabel, TextLabel::Property::TEXT_COLOR ), Color::RED, AlphaFunction::SIN );
animation.SetLoopCount( 3 );
animation.Play();
break;
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;
}