*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
- label.SetAnchorPoint( ParentOrigin::TOP_LEFT );
- label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ label.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::TOP_LEFT );
+ label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK );
label.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f );
label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK );
label.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f );
- label.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::YELLOW );
+ Property::Map shadowMap;
+ shadowMap.Insert( "color", Color::YELLOW );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true );
Vector2 stageSize = Stage::GetCurrent().GetSize();
label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
+
+ shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
break;
}
case SINGLE_COLOR_TEXT_WITH_STYLE:
{
label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" );
break;
}
case SINGLE_COLOR_TEXT_WITH_STYLE:
{
label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" );
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
+
+ shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
break;
}
case SINGLE_COLOR_TEXT_WITH_EMOJI:
{
label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" );
break;
}
case SINGLE_COLOR_TEXT_WITH_EMOJI:
{
label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" );
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
+
+ shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
break;
}
case SINGLE_COLOR_TEXT_WITH_STYLE_EMOJI:
{
label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" );
break;
}
case SINGLE_COLOR_TEXT_WITH_STYLE_EMOJI:
{
label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" );
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
+
+ shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
+
+ shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
break;
}
case MULTI_COLOR_TEXT_WITH_STYLE:
{
label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
break;
}
case MULTI_COLOR_TEXT_WITH_STYLE:
{
label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
+
+ shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
break;
}
case MULTI_COLOR_TEXT_WITH_EMOJI:
{
label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
break;
}
case MULTI_COLOR_TEXT_WITH_EMOJI:
{
label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
+
+ shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
break;
}
case MULTI_COLOR_TEXT_WITH_STYLE_EMOJI:
{
label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
break;
}
case MULTI_COLOR_TEXT_WITH_STYLE_EMOJI:
{
label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
+
+ shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
break;
}
case SMALL_TEXT_IN_LARGE_TEXT_LABEL:
{
label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" );
break;
}
case SMALL_TEXT_IN_LARGE_TEXT_LABEL:
{
label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" );
- label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
+
+ shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
+ label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
- mItemView.SetParentOrigin( ParentOrigin::CENTER );
- mItemView.SetAnchorPoint( AnchorPoint::CENTER );
+ mItemView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mItemView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mLayout = DefaultItemLayout::New( DefaultItemLayout::LIST );
mLayout->SetItemSize( Vector3( stageSize.width, 60.0f, 0.0f ) );
mLayout = DefaultItemLayout::New( DefaultItemLayout::LIST );
mLayout->SetItemSize( Vector3( stageSize.width, 60.0f, 0.0f ) );
- mLayer.SetParentOrigin( ParentOrigin::BOTTOM_CENTER );
- mLayer.SetAnchorPoint( AnchorPoint::BOTTOM_CENTER );
+ mLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
+ mLayer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
mLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
mLayer.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::HEIGHT );
mLayer.SetSizeModeFactor( Vector3( 0.0f, -DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight, 0.0f ) );
mLayer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
mLayer.SetResizePolicy( ResizePolicy::SIZE_FIXED_OFFSET_FROM_PARENT, Dimension::HEIGHT );
mLayer.SetSizeModeFactor( Vector3( 0.0f, -DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight, 0.0f ) );
- mIndicator.SetParentOrigin( ParentOrigin::CENTER );
- mIndicator.SetAnchorPoint( AnchorPoint::CENTER );
+ mIndicator.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
+ mIndicator.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mIndicator.SetProperty( Actor::Property::VISIBLE, false );
// Create a back button in the left of toolbar
PushButton backButton = PushButton::New();
mIndicator.SetProperty( Actor::Property::VISIBLE, false );
// Create a back button in the left of toolbar
PushButton backButton = PushButton::New();
- backButton.SetProperty( DevelButton::Property::UNSELECTED_BACKGROUND_VISUAL, BACK_IMAGE );
- backButton.SetProperty( DevelButton::Property::SELECTED_BACKGROUND_VISUAL, BACK_IMAGE_SELECTED );
+ backButton.SetProperty( Button::Property::UNSELECTED_BACKGROUND_VISUAL, BACK_IMAGE );
+ backButton.SetProperty( Button::Property::SELECTED_BACKGROUND_VISUAL, BACK_IMAGE_SELECTED );
mToolBar.AddControl( backButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
// Create a navigation view to navigate different types of text labels
mNavigationView = NavigationView::New();
mNavigationView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
mToolBar.AddControl( backButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Alignment::HorizontalLeft, DemoHelper::DEFAULT_MODE_SWITCH_PADDING );
// Create a navigation view to navigate different types of text labels
mNavigationView = NavigationView::New();
mNavigationView.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );