layer = Layer::New();
layer.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
layer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
- layer.SetSize( stage.GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
+ layer.SetProperty( Actor::Property::SIZE, stage.GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
stage.GetRootLayer().Add(layer);
// render tasks may have been setup last load so remove them
mImageView = Toolkit::ImageView::New();
- mImageView.SetSize(200, 200);
+ mImageView.SetProperty( Actor::Property::SIZE, Vector2(200, 200) );
mImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
stage.Add(mImageView);
mImageLabel = Toolkit::TextLabel::New();
mImageLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
mImageLabel.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER );
- mImageLabel.SetPosition( Vector3( 0.0f, -50.0f, 0.0f ) );
+ mImageLabel.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -50.0f, 0.0f ) );
mImageLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLACK );
stage.Add(mImageLabel);
mMaskLabel = Toolkit::TextLabel::New();
mMaskLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
mMaskLabel.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER );
- mMaskLabel.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) );
+ mMaskLabel.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) );
mMaskLabel.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLACK );
stage.Add(mMaskLabel);
mBackground = Control::New();
mBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mBackground.SetSize( STAGE_SIZE );
+ mBackground.SetProperty( Actor::Property::SIZE, STAGE_SIZE );
mStage.Add( mBackground );
mButtonIconDecall.SetImage( ICON_DECALL_IMAGE );
mButtonIconDecall.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mButtonIconDecall.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mButtonIconDecall.SetSize( ICON_DECALL_SIZE * SCALED_WIDTH );
- mButtonIconDecall.SetPosition( ICON_DECALL_POSITION * SCALED_WIDTH );
+ mButtonIconDecall.SetProperty( Actor::Property::SIZE, ICON_DECALL_SIZE * SCALED_WIDTH );
+ mButtonIconDecall.SetProperty( Actor::Property::POSITION, ICON_DECALL_POSITION * SCALED_WIDTH );
mButtonIconBattery = ImageView::New();
mButtonIconBattery.SetImage( ICON_BATTERY_IMAGE );
mButtonIconBattery.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
mButtonIconBattery.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
- mButtonIconBattery.SetSize( ICON_BATTERY_SIZE * SCALED_WIDTH );
- mButtonIconBattery.SetPosition( ICON_BATTERY_POSITION * SCALED_WIDTH );
+ mButtonIconBattery.SetProperty( Actor::Property::SIZE, ICON_BATTERY_SIZE * SCALED_WIDTH );
+ mButtonIconBattery.SetProperty( Actor::Property::POSITION, ICON_BATTERY_POSITION * SCALED_WIDTH );
mCallStartButton = PushButton::New();
mCallStartButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCallStartButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mCallStartButton.SetSize( BUTTON_CALL_START_SIZE * SCALED_WIDTH );
- mCallStartButton.SetPosition( BUTTON_CALL_START_POSITION * SCALED_WIDTH );
+ mCallStartButton.SetProperty( Actor::Property::SIZE, BUTTON_CALL_START_SIZE * SCALED_WIDTH );
+ mCallStartButton.SetProperty( Actor::Property::POSITION, BUTTON_CALL_START_POSITION * SCALED_WIDTH );
mCallStartButton.ClickedSignal().Connect( this, &CallController::OnButtonClicked );
mCallStartButton.SetProperty( Button::Property::SELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE );
mCallStartButton.SetProperty( Button::Property::UNSELECTED_BACKGROUND_VISUAL, ICON_CALL_IMAGE );
mLabelIncoming = TextLabel::New( LABEL_INCOMING_STR );
mLabelIncoming.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mLabelIncoming.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mLabelIncoming.SetSize( LABEL_INCOMING_SIZE * SCALED_STAGE_SIZE );
- mLabelIncoming.SetPosition( LABEL_INCOMING_POSITION * SCALED_STAGE_SIZE_3 );
+ mLabelIncoming.SetProperty( Actor::Property::SIZE, LABEL_INCOMING_SIZE * SCALED_STAGE_SIZE );
+ mLabelIncoming.SetProperty( Actor::Property::POSITION, LABEL_INCOMING_POSITION * SCALED_STAGE_SIZE_3 );
mLabelIncoming.SetProperty( Actor::Property::VISIBLE, true );
mLabelIncoming.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_INCOMING_FONT_COLOR );
mLabelIncoming.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_INCOMING_FONT_SIZE * FONT_SCALE );
mLabelName = TextLabel::New( LABEL_NAME_STR );
mLabelName.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mLabelName.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mLabelName.SetSize( LABEL_NAME_SIZE * SCALED_STAGE_SIZE );
- mLabelName.SetPosition( LABEL_NAME_POSITION * SCALED_STAGE_SIZE_3 );
+ mLabelName.SetProperty( Actor::Property::SIZE, LABEL_NAME_SIZE * SCALED_STAGE_SIZE );
+ mLabelName.SetProperty( Actor::Property::POSITION, LABEL_NAME_POSITION * SCALED_STAGE_SIZE_3 );
mLabelName.SetProperty( Actor::Property::VISIBLE, true );
mLabelName.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_NAME_FONT_COLOR );
mLabelName.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_NAME_FONT_SIZE * FONT_SCALE );
mLabelNumber = TextLabel::New( LABEL_NUMBER_STR );
mLabelNumber.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mLabelNumber.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mLabelNumber.SetSize( LABEL_NUMBER_SIZE * SCALED_STAGE_SIZE );
- mLabelNumber.SetPosition( LABEL_NUMBER_POSITION * SCALED_STAGE_SIZE_3 );
+ mLabelNumber.SetProperty( Actor::Property::SIZE, LABEL_NUMBER_SIZE * SCALED_STAGE_SIZE );
+ mLabelNumber.SetProperty( Actor::Property::POSITION, LABEL_NUMBER_POSITION * SCALED_STAGE_SIZE_3 );
mLabelNumber.SetProperty( Actor::Property::VISIBLE, true );
mLabelNumber.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_NUMBER_FONT_COLOR );
mLabelNumber.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_NUMBER_FONT_SIZE * FONT_SCALE );
mLabelDecline = TextLabel::New( LABEL_DECLINE_STR );
mLabelDecline.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
mLabelDecline.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
- mLabelDecline.SetSize( LABEL_DECLINE_SIZE * SCALED_STAGE_SIZE );
- mLabelDecline.SetPosition( LABEL_DECLINE_POSITION * SCALED_WIDTH );
+ mLabelDecline.SetProperty( Actor::Property::SIZE, LABEL_DECLINE_SIZE * SCALED_STAGE_SIZE );
+ mLabelDecline.SetProperty( Actor::Property::POSITION, LABEL_DECLINE_POSITION * SCALED_WIDTH );
mLabelDecline.SetProperty( Actor::Property::VISIBLE, true );
mLabelDecline.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_DECLINE_FONT_COLOR );
mLabelDecline.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_DECLINE_FONT_SIZE * FONT_SCALE );
mButtonClip = Control::New();
mButtonClip.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
mButtonClip.SetProperty( Actor::Property::ANCHOR_POINT, ParentOrigin::BOTTOM_CENTER );
- mButtonClip.SetSize( BUTTON_DECALL_SIZE * SCALED_WIDTH );
- mButtonClip.SetPosition( BUTTON_DECALL_CLIP_POSITION * SCALED_WIDTH );
+ mButtonClip.SetProperty( Actor::Property::SIZE, BUTTON_DECALL_SIZE * SCALED_WIDTH );
+ mButtonClip.SetProperty( Actor::Property::POSITION, BUTTON_DECALL_CLIP_POSITION * SCALED_WIDTH );
mButtonIcon = ImageView::New();
mButtonIcon.SetImage( BUTTON_DECALL_ICON_IMAGE );
mButtonIcon.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mButtonIcon.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mButtonIcon.SetSize( BUTTON_DECALL_ICON_SIZE * SCALED_WIDTH );
- mButtonIcon.SetPosition( BUTTON_DECALL_ICON_POSITION * SCALED_WIDTH );
+ mButtonIcon.SetProperty( Actor::Property::SIZE, BUTTON_DECALL_ICON_SIZE * SCALED_WIDTH );
+ mButtonIcon.SetProperty( Actor::Property::POSITION, BUTTON_DECALL_ICON_POSITION * SCALED_WIDTH );
mCallEndButton = PushButton::New();
mCallEndButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCallEndButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mCallEndButton.SetSize( BUTTON_DECALL_SIZE * SCALED_WIDTH );
- mCallEndButton.SetPosition( BUTTON_DECALL_POSITION * SCALED_WIDTH );
+ mCallEndButton.SetProperty( Actor::Property::SIZE, BUTTON_DECALL_SIZE * SCALED_WIDTH );
+ mCallEndButton.SetProperty( Actor::Property::POSITION, BUTTON_DECALL_POSITION * SCALED_WIDTH );
mCallEndButton.ClickedSignal().Connect( this, &CallController::OnButtonClicked );
mCallEndButton.SetProperty( Button::Property::SELECTED_BACKGROUND_VISUAL, "" );
mCallEndButton.SetProperty( Button::Property::UNSELECTED_BACKGROUND_VISUAL, "" );
mLabelTime = TextLabel::New( LABEL_TIME_STR );
mLabelTime.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mLabelTime.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mLabelTime.SetSize( LABEL_TIME_SIZE * SCALED_STAGE_SIZE );
- mLabelTime.SetPosition( LABEL_TIME_POSITION * SCALED_STAGE_SIZE_3 );
+ mLabelTime.SetProperty( Actor::Property::SIZE, LABEL_TIME_SIZE * SCALED_STAGE_SIZE );
+ mLabelTime.SetProperty( Actor::Property::POSITION, LABEL_TIME_POSITION * SCALED_STAGE_SIZE_3 );
mLabelTime.SetProperty( Actor::Property::VISIBLE, false );
mLabelTime.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TIME_FONT_COLOR );
mLabelTime.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TIME_FONT_SIZE * FONT_SCALE );
mCard[k].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCard[k].SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mCard[k].SetSize( mSize.x, mSize.y );
- mCard[k].SetPosition( mPosition[k].x, mPosition[k].y );
+ mCard[k].SetProperty( Actor::Property::SIZE, Vector2( mSize.x, mSize.y ) );
+ mCard[k].SetProperty( Actor::Property::POSITION, Vector2( mPosition[k].x, mPosition[k].y ));
stage.Add( mCard[k] );
}
mBackground = Control::New();
mBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mBackground.SetSize( STAGE_SIZE );
+ mBackground.SetProperty( Actor::Property::SIZE, STAGE_SIZE );
mStage.Add( mBackground );
mAddButton.SetImage( BUTTON_ADD_IMAGE );
mAddButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
mAddButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
- mAddButton.SetSize( BUTTON_ADD_SIZE * SCALED_WIDTH );
- mAddButton.SetPosition( BUTTON_ADD_POSITION * SCALED_WIDTH );
+ mAddButton.SetProperty( Actor::Property::SIZE, BUTTON_ADD_SIZE * SCALED_WIDTH );
+ mAddButton.SetProperty( Actor::Property::POSITION, BUTTON_ADD_POSITION * SCALED_WIDTH );
mLabel1 = TextLabel::New( LABEL_TICKET_STR );
mLabel1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
mLabel1.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
- mLabel1.SetSize( LABEL_TICKET_SIZE * SCALED_WIDTH );
- mLabel1.SetPosition( LABEL_TICKET_POSITION * SCALED_WIDTH );
+ mLabel1.SetProperty( Actor::Property::SIZE, LABEL_TICKET_SIZE * SCALED_WIDTH );
+ mLabel1.SetProperty( Actor::Property::POSITION, LABEL_TICKET_POSITION * SCALED_WIDTH );
mLabel1.SetProperty( Actor::Property::VISIBLE, true );
mLabel1.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TICKET_FONT_COLOR );
mLabel1.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TICKET_FONT_SIZE * FONT_SCALE );
mLabel2 = TextLabel::New( LABEL_HOLD_STR );
mLabel2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mLabel2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mLabel2.SetSize( LABEL_HOLD_SIZE * SCALED_WIDTH );
- mLabel2.SetPosition( LABEL_HOLD_POSITION * SCALED_WIDTH );
+ mLabel2.SetProperty( Actor::Property::SIZE, LABEL_HOLD_SIZE * SCALED_WIDTH );
+ mLabel2.SetProperty( Actor::Property::POSITION, LABEL_HOLD_POSITION * SCALED_WIDTH );
mLabel2.SetProperty( Actor::Property::VISIBLE, false );
mLabel2.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_HOLD_FONT_COLOR );
mLabel2.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_HOLD_FONT_SIZE * FONT_SCALE );
mLabel3 = TextLabel::New( LABEL_TERMINAL_STR );
mLabel3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mLabel3.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mLabel3.SetSize( LABEL_TERMINAL_SIZE * SCALED_WIDTH );
- mLabel3.SetPosition( LABEL_TERMINAL_POSITION * SCALED_WIDTH );
+ mLabel3.SetProperty( Actor::Property::SIZE, LABEL_TERMINAL_SIZE * SCALED_WIDTH );
+ mLabel3.SetProperty( Actor::Property::POSITION, LABEL_TERMINAL_POSITION * SCALED_WIDTH );
mLabel3.SetProperty( Actor::Property::VISIBLE, false );
mLabel3.SetProperty( TextLabel::Property::TEXT_COLOR, LABEL_TERMINAL_FONT_COLOR );
mLabel3.SetProperty( TextLabel::Property::POINT_SIZE, LABEL_TERMINAL_FONT_SIZE * FONT_SCALE );
radioButtonLayout.SetCellAlignment( TableView::CellPosition( 0, 1 ),
HorizontalAlignment::CENTER,
VerticalAlignment::CENTER );
- radioButtonLayout.SetY( -10.0f );
+ radioButtonLayout.SetProperty( Actor::Property::POSITION_Y, -10.0f );
Stage::GetCurrent().Add( radioButtonLayout );
}
control.SetProperty( Toolkit::ImageView::Property::IMAGE, SetupViewProperties( mImageType, index ) );
control.SetProperty( Actor::Property::ANCHOR_POINT, IMAGE_LAYOUT_INFO[ index ].anchorPoint );
control.SetProperty( Actor::Property::PARENT_ORIGIN, IMAGE_LAYOUT_INFO[ index ].parentOrigin );
- control.SetY( IMAGE_LAYOUT_INFO[ index ].yPosition );
+ control.SetProperty( Actor::Property::POSITION_Y, IMAGE_LAYOUT_INFO[ index ].yPosition );
// We do not want the animated image playing when it's added to the stage.
PauseAnimatedImage( control );
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
Actor actor = Actor::New();
- actor.SetSize( 400.0f, 400.0f );
- actor.SetPosition( center );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+ actor.SetProperty( Actor::Property::POSITION, center );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetProperty( Actor::Property::COLOR,Vector4(1.0f,1.0f,0.0f,1.0f) );
actor.AddRenderer( renderer );
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
Actor actor = Actor::New();
- actor.SetSize( 400.0f, 400.0f );
- actor.SetPosition( center );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+ actor.SetProperty( Actor::Property::POSITION, center );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.AddRenderer( renderer );
renderer.SetProperty( Renderer::Property::BLEND_MODE, BlendMode::ON );
Actor actor = Actor::New();
- actor.SetSize( 400.0f, 400.0f );
- actor.SetPosition( center );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 400.0f, 400.0f ) );
+ actor.SetProperty( Actor::Property::POSITION, center );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetProperty( Actor::Property::COLOR,Vector4(1.0f,0.0f,0.0f,1.0f) );
actor.AddRenderer( renderer );
mControl = Control::New();
mControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mControl.SetSize( 200.0f, 200.0f );
+ mControl.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
mControl.SetProperty( Control::Property::BACKGROUND, BACKGROUND );
stage.Add( mControl );
for( size_t i(0); i<actorCount; ++i )
{
mImageView[i] = ImageView::New(ImagePath(i));
- mImageView[i].SetSize(Vector3(0.0f,0.0f,0.0f));
+ mImageView[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) );
mImageView[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
stage.Add(mImageView[i]);
}
{
mActor[i] = Actor::New();
mActor[i].AddRenderer( renderers[i % numImages] );
- mActor[i].SetSize(0.0f,0.0f,0.0f);
+ mActor[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) );
stage.Add(mActor[i]);
}
}
}
if( gUseMesh )
{
- mActor[count].SetPosition( initialPosition );
- mActor[count].SetSize( Vector3(0.0f,0.0f,0.0f) );
+ mActor[count].SetProperty( Actor::Property::POSITION, initialPosition );
+ mActor[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) );
mActor[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian(0.0f),Vector3::XAXIS) );
mShow.AnimateTo( Property( mActor[count], Actor::Property::POSITION), Vector3(xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
mShow.AnimateTo( Property( mActor[count], Actor::Property::SIZE), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
}
else
{
- mImageView[count].SetPosition( initialPosition );
- mImageView[count].SetSize( Vector3(0.0f,0.0f,0.0f) );
+ mImageView[count].SetProperty( Actor::Property::POSITION, initialPosition );
+ mImageView[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) );
mImageView[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Radian(0.0f),Vector3::XAXIS) );
mShow.AnimateTo( Property( mImageView[count], Actor::Property::POSITION), Vector3(xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
mShow.AnimateTo( Property( mImageView[count], Actor::Property::SIZE), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ));
Actor CreateControlPoint( Actor parent, const char* url, Vector3 position)
{
Actor actor = ImageView::New( url );
- actor.SetScale( mControlPointScale);
+ actor.SetProperty( Actor::Property::SCALE, mControlPointScale);
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// Curve and line drawing works off current value (i.e. last update frame's value). Need to animate to ensure
// initial position is baked to both frames before initially drawing the curve.
{
Vector3 position( event.GetScreenPosition( 0 ) );
- mDragActor.SetPosition( position - Vector3( mRelativeDragPoint ) );
+ mDragActor.SetProperty( Actor::Property::POSITION, position - Vector3( mRelativeDragPoint ) );
if( event.GetState( 0 ) == PointState::UP ) // Stop dragging
{
// Ball setup
mBallStartPosition = stageSize * Vector3( BALL_START_POSITION );
mBall = CreateImage(BALL_IMAGE);
- mBall.SetPosition( mBallStartPosition );
- mBall.SetSize( BALL_SIZE * stageSize.width );
+ mBall.SetProperty( Actor::Property::POSITION, mBallStartPosition );
+ mBall.SetProperty( Actor::Property::SIZE, BALL_SIZE * stageSize.width );
mContentLayer.Add(mBall);
mBallVelocity = Vector3::ZERO;
mPaddle.Add( mPaddleImage );
mPaddleHandle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
mPaddleHandle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
- mPaddleHandle.SetPosition( 0.0f, stageSize.width * 0.0125f );
+ mPaddleHandle.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, stageSize.width * 0.0125f ));
mPaddleImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
mPaddleImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
mPaddle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mPaddle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mPaddleFullSize = PADDLE_SIZE * stageSize.width;
- mPaddle.SetSize( mPaddleFullSize + mPaddleHitMargin );
- mPaddleHandle.SetSize( PADDLE_HANDLE_SIZE * stageSize.width );
- mPaddleImage.SetSize( mPaddleFullSize );
+ mPaddle.SetProperty( Actor::Property::SIZE, mPaddleFullSize + mPaddleHitMargin );
+ mPaddleHandle.SetProperty( Actor::Property::SIZE, PADDLE_HANDLE_SIZE * stageSize.width );
+ mPaddleImage.SetProperty( Actor::Property::SIZE, mPaddleFullSize );
mWobbleProperty = mPaddle.RegisterProperty(WOBBLE_PROPERTY_NAME, 0.0f);
Constraint wobbleConstraint = Constraint::New<Quaternion>( mPaddle, Actor::Property::ORIENTATION, WobbleConstraint(Degree( 10.0f )));
wobbleConstraint.AddSource( LocalSource(mWobbleProperty) );
wobbleConstraint.Apply();
- mPaddle.SetPosition( stageSize * Vector3( PADDLE_START_POSITION ) );
+ mPaddle.SetProperty( Actor::Property::POSITION, stageSize * Vector3( PADDLE_START_POSITION ) );
mContentLayer.Add(mPaddle);
mPaddle.TouchSignal().Connect(this, &ExampleController::OnTouchPaddle);
mContentLayer.TouchSignal().Connect(this, &ExampleController::OnTouchLayer);
{
mLives = TOTAL_LIVES;
mLevel = 0;
- mBall.SetPosition( mBallStartPosition );
+ mBall.SetProperty( Actor::Property::POSITION, mBallStartPosition );
mBallVelocity = Vector3::ZERO;
- mPaddle.SetSize( mPaddleFullSize + mPaddleHitMargin );
- mPaddleImage.SetSize( mPaddleFullSize );
+ mPaddle.SetProperty( Actor::Property::SIZE, mPaddleFullSize + mPaddleHitMargin );
+ mPaddleImage.SetProperty( Actor::Property::SIZE, mPaddleFullSize );
LoadLevel(mLevel);
}
brick.SetProperty( ImageView::Property::IMAGE, mBrickImageMap );
brick.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
brick.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
- brick.SetPosition( Vector3( position ) );
+ brick.SetProperty( Actor::Property::POSITION, position );
// Add a constraint on the brick between it and the ball generating a collision-property
Property::Index property = brick.RegisterProperty(COLLISION_PROPERTY_NAME, Vector3::ZERO);
if(mDragActor)
{
Vector3 position( event.GetScreenPosition( 0 ) );
- mPaddle.SetPosition( position - mRelativeDragPoint );
+ mPaddle.SetProperty( Actor::Property::POSITION, position - mRelativeDragPoint );
if( event.GetState( 0 ) == PointState::UP ) // Stop dragging
{
void OnPaddleShrunk( Animation &source )
{
// Reposition Ball in start position, and make ball appear.
- mBall.SetPosition( mBallStartPosition );
+ mBall.SetProperty( Actor::Property::POSITION, mBallStartPosition );
mBall.SetProperty( Actor::Property::COLOR, Vector4(1.0f, 1.0f, 1.0f, 0.1f) );
Animation appear = Animation::New(0.5f);
appear.AnimateTo( Property(mBall, Actor::Property::COLOR), Vector4(1.0f, 1.0f, 1.0f, 1.0f) );
mRootActor = Actor::New();
mRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mRootActor.SetSize( stageSize );
+ mRootActor.SetProperty( Actor::Property::SIZE, stageSize );
stage.Add( mRootActor );
// Create the object that will perform the blooming work
mBloomView = Dali::Toolkit::BloomView::New();
mBloomView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mBloomView.SetSize( viewSize );
+ mBloomView.SetProperty( Actor::Property::SIZE, viewSize );
mRootActor.Add( mBloomView );
mBloomView.Activate();
Layer backgroundLayer = Layer::New();
- backgroundLayer.SetSize( viewSize );
+ backgroundLayer.SetProperty( Actor::Property::SIZE, viewSize );
backgroundLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mBloomView.Add( backgroundLayer );
// Create the background image
ImageView backgroundImage = ImageView::New( BACKGROUND_IMAGE_PATH );
backgroundImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- backgroundImage.SetSize( viewSize );
+ backgroundImage.SetProperty( Actor::Property::SIZE, viewSize );
backgroundLayer.Add( backgroundImage );
Layer foregroundLayer = Layer::New();
- foregroundLayer.SetSize( viewSize );
+ foregroundLayer.SetProperty( Actor::Property::SIZE, viewSize );
foregroundLayer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mBloomView.Add( foregroundLayer );
// Create visible actors
mObjectRootActor = Actor::New();
mObjectRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mObjectRootActor.SetSize( viewSize );
+ mObjectRootActor.SetProperty( Actor::Property::SIZE, viewSize );
foregroundLayer.Add( mObjectRootActor );
ImageView imageView = ImageView::New( UI_DIFFUSE_IMAGE );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- imageView.SetSize( viewSize );
+ imageView.SetProperty( Actor::Property::SIZE, viewSize );
mObjectRootActor.Add( imageView );
imageView = ImageView::New( UI_DIFFUSE_IMAGE );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- imageView.SetSize( stageSize * 0.5f );
- imageView.SetPosition( 0.0f, 0.0f, 100.0f );
+ imageView.SetProperty( Actor::Property::SIZE, stageSize * 0.5f );
+ imageView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 100.0f ) );
mObjectRootActor.Add( imageView );
AnimateBloomView();
// Get the root actor of all bubbles, and add it to stage.
Actor bubbleRoot = mBubbleEmitter.GetRootActor();
bubbleRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- bubbleRoot.SetZ(0.1f); // Make sure the bubbles displayed on top og the background.
+ bubbleRoot.SetProperty( Actor::Property::POSITION_Z, 0.1f); // Make sure the bubbles displayed on top og the background.
content.Add( bubbleRoot );
// Set the application background
mBuilderLayer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_CENTER);
Dali::Vector3 size = Stage::GetCurrent().GetRootLayer().GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
size.y -= DemoHelper::DEFAULT_VIEW_STYLE.mToolBarHeight;
- mBuilderLayer.SetSize( size );
+ mBuilderLayer.SetProperty( Actor::Property::SIZE, size );
mNavigationView.Push( mBuilderLayer );
}
contentTable.SetFitHeight( i );
}
- contentTable.SetPosition( 0.0f, TOP_MARGIN );
+ contentTable.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, TOP_MARGIN ));
mContentLayer.Add( contentTable );
// Radio 1
{
Toolkit::ImageView image = Toolkit::ImageView::New( SMALL_IMAGE_1 );
- image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
+ image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) );
mRadioButtonImage1 = Dali::Toolkit::RadioButton::New( "1" );
mRadioButtonImage1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mRadioButtonImage1.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mRadioButtonImage1.SetPosition( 0, DP(radioY) );
+ mRadioButtonImage1.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(radioY) ));
mRadioButtonImage1.SetProperty( Toolkit::Button::Property::SELECTED, true );
imageSelectTableView.AddChild( mRadioButtonImage1, Toolkit::TableView::CellPosition( 0, 0 ) );
radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING;
Toolkit::ImageView image = Toolkit::ImageView::New( SMALL_IMAGE_2 );
- image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
+ image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) );
mRadioButtonImage2 = Dali::Toolkit::RadioButton::New( "2" );
mRadioButtonImage2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mRadioButtonImage2.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mRadioButtonImage2.SetPosition( 0, DP(radioY) );
+ mRadioButtonImage2.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(radioY) ));
imageSelectTableView.AddChild( mRadioButtonImage2, Toolkit::TableView::CellPosition( 1, 0 ) );
imageSelectTableView.AddChild( image, Toolkit::TableView::CellPosition( 1, 1 ) );
radioY += RADIO_LABEL_THUMBNAIL_SIZE + RADIO_IMAGE_SPACING;
Toolkit::ImageView image = Toolkit::ImageView::New( SMALL_IMAGE_3 );
- image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
+ image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) );
mRadioButtonImage3 = Dali::Toolkit::RadioButton::New( "3" );
mRadioButtonImage3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mRadioButtonImage3.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mRadioButtonImage3.SetPosition( 0, DP(radioY) );
+ mRadioButtonImage3.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(radioY) ));
imageSelectTableView.AddChild( mRadioButtonImage3, Toolkit::TableView::CellPosition( 2, 0 ) );
imageSelectTableView.AddChild( image, Toolkit::TableView::CellPosition( 2, 1 ) );
textLabel.SetProperty( Toolkit::TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
Toolkit::ImageView image = Toolkit::ImageView::New( ENABLED_IMAGE );
- image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
+ image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) );
image.SetProperty( Actor::Property::PADDING, Padding( DP(20.0f), 0.0f, 0.0f, 0.0f ) );
tableView.AddChild( image, Toolkit::TableView::CellPosition( 0, 1 ) );
radioButton.SetProperty( Dali::Actor::Property::NAME, "radioSelectEnable" );
radioButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
radioButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- radioButton.SetPosition( 0, 0 );
+ radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
radioButton.SetProperty( Toolkit::Button::Property::SELECTED, true );
radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButton );
radioButton.SetProperty( Dali::Actor::Property::NAME, "radioSelectDisable" );
radioButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
radioButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- radioButton.SetPosition( 0, DP(50) );
+ radioButton.SetProperty( Actor::Property::POSITION, Vector2( 0, DP(50) ));
radioButton.StateChangedSignal().Connect( this, &ButtonsController::EnableSelectButton );
.Add( BorderVisual::Property::COLOR, Color::WHITE )
.Add( BorderVisual::Property::SIZE, 2.0f )
.Add( BorderVisual::Property::ANTI_ALIASING, true ) );
- border.SetSize( Vector3( itemViewLayoutSize.x + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.y + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.z + ITEM_VIEW_BORDER_SIZE * 2.0f ) );
+ border.SetProperty( Actor::Property::SIZE, Vector3( itemViewLayoutSize.x + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.y + ITEM_VIEW_BORDER_SIZE * 2.0f, itemViewLayoutSize.z + ITEM_VIEW_BORDER_SIZE * 2.0f ) );
stage.Add( border );
// Constrain the border's orientation to the orientation of item-view.
mImageView = ImageView::New( IMAGE_FILE );
mImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mImageView.SetSize( 200.0f, 200.0f );
+ mImageView.SetProperty( Actor::Property::SIZE, Vector2( 200.0f, 200.0f ) );
mImageView.SetProperty( DevelControl::Property::SHADOW, SHADOW );
stage.Add( mImageView );
renderer.SetTextures( textureSet );
//Set actor size and add the renderer
- actor.SetSize( texture.GetWidth(), texture.GetHeight() );
+ actor.SetProperty( Actor::Property::SIZE, Vector2( texture.GetWidth(), texture.GetHeight() ) );
actor.AddRenderer( renderer );
}
mContactCard.SetProperty( Actor::Property::CLIPPING_MODE, ClippingMode::CLIP_CHILDREN );
mContactCard.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mContactCard.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mContactCard.SetPosition( foldedPosition.x, foldedPosition.y );
- mContactCard.SetSize( mContactCardLayoutInfo.foldedSize );
+ mContactCard.SetProperty( Actor::Property::POSITION, Vector2( foldedPosition.x, foldedPosition.y ));
+ mContactCard.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.foldedSize );
stage.Add( mContactCard );
// Create the header which will be shown only when the contact is unfolded
mHeader = Control::New();
- mHeader.SetSize( mContactCardLayoutInfo.headerSize );
+ mHeader.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.headerSize );
mHeader.SetProperty( Control::Property::BACKGROUND,
Property::Map{ { Toolkit::Visual::Property::TYPE, Visual::COLOR },
{ ColorVisual::Property::MIX_COLOR, HEADER_COLOR } } );
mHeader.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mHeader.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mHeader.SetPosition( mContactCardLayoutInfo.headerFoldedPosition.x, mContactCardLayoutInfo.headerFoldedPosition.y );
+ mHeader.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.headerFoldedPosition.x, mContactCardLayoutInfo.headerFoldedPosition.y ));
// Create a clipped image (whose clipping can be animated)
mClippedImage = ClippedImage::Create( imagePath, mClippedImagePropertyIndex );
- mClippedImage.SetSize( mContactCardLayoutInfo.imageSize );
+ mClippedImage.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.imageSize );
mClippedImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mClippedImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mClippedImage.SetPosition( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y );
+ mClippedImage.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y ));
mClippedImage.SetProperty( Actor::Property::VISIBLE, false ); // Hide image as we only want to display it if we are animating or unfolded
mContactCard.Add( mClippedImage );
// Create an image with a mask which is to be used when the contact is folded
mMaskedImage = MaskedImage::Create( imagePath );
- mMaskedImage.SetSize( mContactCardLayoutInfo.imageSize );
+ mMaskedImage.SetProperty( Actor::Property::SIZE, mContactCardLayoutInfo.imageSize );
mMaskedImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mMaskedImage.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mMaskedImage.SetPosition( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y );
+ mMaskedImage.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.imageFoldedPosition.x, mContactCardLayoutInfo.imageFoldedPosition.y ));
mContactCard.Add( mMaskedImage );
// Add the text label for just the name
mNameText.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mNameText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mNameText.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- mNameText.SetPosition( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y );
+ mNameText.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y ));
mContactCard.Add( mNameText );
// Create the detail text-label
mDetailText.SetStyleName( "ContactDetailTextLabel" );
mDetailText.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mDetailText.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mDetailText.SetPosition( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y );
- mDetailText.SetSize( Vector2( mContactCardLayoutInfo.unfoldedSize.width - mContactCardLayoutInfo.textFoldedPosition.x * 2.0f, 0.0f ) );
+ mDetailText.SetProperty( Actor::Property::POSITION, Vector2( mContactCardLayoutInfo.textFoldedPosition.x, mContactCardLayoutInfo.textFoldedPosition.y ));
+ mDetailText.SetProperty( Actor::Property::SIZE, Vector2( mContactCardLayoutInfo.unfoldedSize.width - mContactCardLayoutInfo.textFoldedPosition.x * 2.0f, 0.0f ) );
mDetailText.SetProperty( DevelActor::Property::OPACITY, 0.0f );
// Attach tap detection to the overall clip control
mCubeWaveEffect.SetCubeDisplacement( CUBE_DISPLACEMENT_WAVE );
mCubeWaveEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted);
- mCubeWaveEffect.SetSize( mViewSize );
+ mCubeWaveEffect.SetProperty( Actor::Property::SIZE, mViewSize );
mCubeWaveEffect.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCubeWaveEffect.SetCurrentTexture( mCurrentTexture );
mCubeCrossEffect.SetCubeDisplacement( CUBE_DISPLACEMENT_CROSS );
mCubeCrossEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted);
- mCubeCrossEffect.SetSize( mViewSize );
+ mCubeCrossEffect.SetProperty( Actor::Property::SIZE, mViewSize );
mCubeCrossEffect.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCubeCrossEffect.SetCurrentTexture( mCurrentTexture );
mCubeFoldEffect.SetTransitionDuration( ANIMATION_DURATION_FOLD );
mCubeFoldEffect.TransitionCompletedSignal().Connect(this, &CubeTransitionApp::OnTransitionCompleted);
- mCubeFoldEffect.SetSize( mViewSize );
+ mCubeFoldEffect.SetProperty( Actor::Property::SIZE, mViewSize );
mCubeFoldEffect.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCubeFoldEffect.SetCurrentTexture( mCurrentTexture );
CenterActor(a);
Vector3 position{ v * unit * 5.f };
- a.SetPosition(position);
+ a.SetProperty( Actor::Property::POSITION, position );
float scale = (c + ((v.x + v.y + v.z) + c * 3.f) * .5f) / (c * 4.f);
Vector3 size{ Vector3::ONE * scale * unit * 2.f };
- a.SetSize(size);
+ a.SetProperty( Actor::Property::SIZE, size);
a.SetProperty( Actor::Property::COLOR,Color::WHITE * .25f +
(Color::RED * (v.x + c) / (c * 2.f) +
// Create final image for deferred shading
auto finalImage = Actor::New();
CenterActor(finalImage);
- finalImage.SetSize(stageSize);
+ finalImage.SetProperty( Actor::Property::SIZE, stageSize);
TextureSet finalImageTextures = TextureSet::New();
finalImageTextures.SetTexture(0, rttNormal);
// Set size to stage size to avoid seeing a black border on transition
mParent = Actor::New();
- mParent.SetSize( Stage::GetCurrent().GetSize() );
+ mParent.SetProperty( Actor::Property::SIZE, Stage::GetCurrent().GetSize() );
mParent.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mContent.Add( mParent );
mNextImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
mNextImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
- mNextImage.SetZ(INITIAL_DEPTH);
+ mNextImage.SetProperty( Actor::Property::POSITION_Z, INITIAL_DEPTH);
mParent.Add( mNextImage );
Vector2 size = Vector2( mCurrentImage.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ) );
StartTransition( gesture.position / size, gesture.displacement * Vector2(1.0, size.x/size.y));
mNextImage.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mNextImage.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
mNextImage.SetProperty( Actor::Property::SIZE_SCALE_POLICY, SizeScalePolicy::FIT_WITH_ASPECT_RATIO );
- mNextImage.SetZ(INITIAL_DEPTH);
+ mNextImage.SetProperty( Actor::Property::POSITION_Z, INITIAL_DEPTH);
mParent.Add( mNextImage );
switch( mCentralLineIndex%4 )
{
stage.KeyEventSignal().Connect( this, &DragAndDropExample::OnKeyEvent );
TextLabel hintText = TextLabel::New("please drag one textlabel, move and drop on other textlabel");
- hintText.SetPosition(0.0f, 700.0f);
+ hintText.SetProperty( Actor::Property::POSITION, Vector2(0.0f, 700.0f));
hintText.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
hintText.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
hintText.SetProperty(TextLabel::Property::MULTI_LINE, true);
mTextLabel[i].SetProperty(TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER");
mTextLabel[i].SetBackgroundColor(TEXT_LABEL_COLOR[i]);
- mTextLabel[i].SetSize(TEXT_LABEL_WIDTH, TEXT_LABEL_HEIGHT);
- mTextLabel[i].SetPosition(TEXT_LABEL_POSITION_X, TEXT_LABEL_POSITION_START_Y + TEXT_LABEL_HEIGHT * i);
+ mTextLabel[i].SetProperty( Actor::Property::SIZE, Vector2(TEXT_LABEL_WIDTH, TEXT_LABEL_HEIGHT) );
+ mTextLabel[i].SetProperty( Actor::Property::POSITION, Vector2(TEXT_LABEL_POSITION_X, TEXT_LABEL_POSITION_START_Y + TEXT_LABEL_HEIGHT * i));
mDragAndDropDetector.Attach(mTextLabel[i]);
mRect[i] = Rect<float>(TEXT_LABEL_POSITION_X, TEXT_LABEL_POSITION_START_Y + TEXT_LABEL_HEIGHT * i, TEXT_LABEL_WIDTH, TEXT_LABEL_HEIGHT);
mDropShadowView = CreateEffectsView( EffectsView::DROP_SHADOW, effectsViewSize, mEffectSize );
mDropShadowView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mDropShadowView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
- mDropShadowView.SetZ( -mStageSize.height * 0.1f );
+ mDropShadowView.SetProperty( Actor::Property::POSITION_Z, -mStageSize.height * 0.1f );
mContents.Add( mDropShadowView );
mEmbossView = CreateEffectsView( EffectsView::EMBOSS, effectsViewSize, mEffectSize );
mEmbossView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mEmbossView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
- mEmbossView.SetZ( mStageSize.height * 0.1f );
+ mEmbossView.SetProperty( Actor::Property::POSITION_Z, mStageSize.height * 0.1f );
mContents.Add( mEmbossView );
SetTitle( mEffectSize );
{
Toolkit::EffectsView effectsView = Toolkit::EffectsView::New(type);
// set control size
- effectsView.SetSize( viewSize.width, viewSize.height );
+ effectsView.SetProperty( Actor::Property::SIZE, Vector2( viewSize.width, viewSize.height ) );
// set effect size property
effectsView.SetProperty( EffectsView::Property::EFFECT_SIZE, effectSize );
TextLabel textActor( TextLabel::New( text ) );
textActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
textActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
- textActor.SetSize( viewSize );
- textActor.SetPosition( viewSize.width*0.4f, viewSize.height*0.3f );
+ textActor.SetProperty( Actor::Property::SIZE, viewSize );
+ textActor.SetProperty( Actor::Property::POSITION, Vector2( viewSize.width*0.4f, viewSize.height*0.3f ));
textActor.SetProperty( TextLabel::Property::POINT_SIZE, DemoHelper::ScalePointSize(14.f) );
effectsView.Add( textActor );
ImageView icon = ImageView::New( TEST_IMAGE );
icon.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER_LEFT );
icon.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER_LEFT );
- icon.SetX( viewSize.width*0.1f );
- icon.SetSize( viewSize.height*0.8f, viewSize.height*0.8f );
+ icon.SetProperty( Actor::Property::POSITION_X, viewSize.width*0.1f );
+ icon.SetProperty( Actor::Property::SIZE, Vector2( viewSize.height*0.8f, viewSize.height*0.8f ) );
effectsView.Add( icon );
AnimateEffectProperties( effectsView );
mFlexContainer = FlexContainer::New();
mFlexContainer.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mFlexContainer.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
- mFlexContainer.SetSize( stageSize.width, stageSize.height - VIEW_STYLE.mToolBarHeight );
- mFlexContainer.SetY(VIEW_STYLE.mToolBarHeight);
+ mFlexContainer.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width, stageSize.height - VIEW_STYLE.mToolBarHeight ) );
+ mFlexContainer.SetProperty( Actor::Property::POSITION_Y, VIEW_STYLE.mToolBarHeight);
mFlexContainer.SetProperty(FlexContainer::Property::FLEX_DIRECTION, FlexContainer::COLUMN); // column as main axis
contents.Add(mFlexContainer);
// flex properties that only work when there are multiple lines in the layout
flexItem.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
// Make sure there are still extra space in the line after wrapping
- flexItem.SetSize(stageSize.width / NUM_FLEX_ITEMS * 1.25f, (stageSize.height - VIEW_STYLE.mToolBarHeight) * 0.95f / NUM_FLEX_ITEMS * 1.25f);
+ flexItem.SetProperty( Actor::Property::SIZE, Vector2(stageSize.width / NUM_FLEX_ITEMS * 1.25f, (stageSize.height - VIEW_STYLE.mToolBarHeight) * 0.95f / NUM_FLEX_ITEMS * 1.25f) );
mFlexItemContainer.Add( flexItem );
}
{
contentTable.SetFitHeight( i );
}
- contentTable.SetPosition( 0.0f, TOP_MARGIN );
+ contentTable.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, TOP_MARGIN ));
mContentLayer.Add( contentTable );
// Create label to display which control's KeyEvent callback is called
mEventLabel = TextLabel::New("Controls don't get KeyEvent yet");
- mEventLabel.SetSize( mStage.GetSize().width, mStage.GetSize().height*0.1f );
+ mEventLabel.SetProperty( Actor::Property::SIZE, Vector2( mStage.GetSize().width, mStage.GetSize().height*0.1f ) );
mEventLabel.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH);
mEventLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
mEventLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
contentTable.Add( mEventLabel );
mContainer = TableView::New( 4, 3 );
- mContainer.SetSize( mStage.GetSize().width, mStage.GetSize().height*0.4f );
+ mContainer.SetProperty( Actor::Property::SIZE, Vector2( mStage.GetSize().width, mStage.GetSize().height*0.4f ) );
mContainer.SetResizePolicy(ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH);
mContainer.SetBackgroundColor( BACKGROUND_COLOUR );
mContainer.SetCellPadding( Size( MARGIN_SIZE, MARGIN_SIZE ) );
mLeftLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mLeftLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mLeftLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- mLeftLabel.SetSize( Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) );
+ mLeftLabel.SetProperty( Actor::Property::SIZE, Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) );
mLeftLabel.SetProperty( Toolkit::Control::Property::BACKGROUND,
Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
.Add( ColorVisual::Property::MIX_COLOR, Vector4( 0.0, 0.0, 0.7, 0.2 ) ) );
mRightLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mRightLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mRightLabel.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- mRightLabel.SetSize( Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) );
+ mRightLabel.SetProperty( Actor::Property::SIZE, Vector3( stageSize.x*0.5, stageSize.y, 1.0f ) );
mRightLabel.SetProperty( Toolkit::Control::Property::BACKGROUND,
Property::Map().Add( Toolkit::Visual::Property::TYPE, Visual::COLOR )
.Add( ColorVisual::Property::MIX_COLOR, Vector4( 0.5, 0.0, 0.0, 0.2 ) ) );
uiCamera.RotateBy( Degree(90.0f), Vector3( 0.0f, 0.0f, 1.0f ));
}
- mLeftLabel.SetPosition( Vector3( -stageSize.x*0.25f, 0.0, 0.0 ) );
- mRightLabel.SetPosition( Vector3( stageSize.x*0.25f, 0.0, 0.0 ) );
+ mLeftLabel.SetProperty( Actor::Property::POSITION, Vector3( -stageSize.x*0.25f, 0.0, 0.0 ) );
+ mRightLabel.SetProperty( Actor::Property::POSITION, Vector3( stageSize.x*0.25f, 0.0, 0.0 ) );
mUiRoot.Add( mLeftLabel );
mUiRoot.Add( mRightLabel );
position += sidewaysVector * (sidewaysSpeed * 0.5f);
- mCameraActor.SetPosition( position );
+ mCameraActor.SetProperty( Actor::Property::POSITION, position );
mCameraPosition = position;
// should be read from file
mCameraActor.SetNearClippingPlane( mNear );
mCameraActor.SetFarClippingPlane( mFar );
- mCameraActor.SetPosition( CAMERA_DEFAULT_POSITION );
+ mCameraActor.SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION );
// Camera position is shadowed in order to avoid using.GetCurrentProperty< Vector3 >( Actor::Property::POSITION )
mCameraPosition = CAMERA_DEFAULT_POSITION;
mInterceptorActor = Actor::New();
mInterceptorActor.SetProperty( Dali::Actor::Property::NAME, "GameInputInterceptor" );
- mInterceptorActor.SetSize( Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) );
- mInterceptorActor.SetPosition( Vector3( 0.0, 0.0, 1.0 ) );
+ mInterceptorActor.SetProperty( Actor::Property::SIZE, Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) );
+ mInterceptorActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0, 0.0, 1.0 ) );
mInterceptorActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mInterceptorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCameraActor.Add( mInterceptorActor );
void GameEntity::SetLocation( const Dali::Vector3& loc )
{
- mActor.SetPosition( loc );
+ mActor.SetProperty( Dali::Actor::Property::POSITION, loc );
}
void GameEntity::SetRotation( const Dali::Quaternion& rot )
void GameEntity::SetScale( const Dali::Vector3& scale )
{
- mActor.SetScale( scale );
+ mActor.SetProperty( Dali::Actor::Property::SCALE, scale );
}
void GameEntity::SetSize( const Dali::Vector3& size )
{
- mActor.SetSize( size );
+ mActor.SetProperty( Dali::Actor::Property::SIZE, size );
}
mRootActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mRootActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
stage.GetRootLayer().Add( mRootActor );
- mRootActor.SetScale( -1.0, 1.0, 1.0 );
- mRootActor.SetPosition( 0.0, 0.0, 0.0 );
+ mRootActor.SetProperty( Actor::Property::SCALE, Vector3( -1.0, 1.0, 1.0 ) );
+ mRootActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0, 0.0, 0.0 ) );
mRootActor.SetProperty( Actor::Property::ORIENTATION, Quaternion( Degree( 90 ), Vector3( 1.0, 0.0, 0.0 ) ) );
for( size_t i = 0; i < mEntities.Size(); ++i )
{
ImageView imageView = ImageView::New( IMAGE_NAME );
imageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
imageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
- imageView.SetY( yPos );
+ imageView.SetProperty( Actor::Property::POSITION_Y, yPos );
yPos += imageView.GetNaturalSize().height;
// Add the ID of the created ImageView to mFrameCallback.
Layer onTop = Layer::New();
onTop.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
onTop.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- onTop.SetSize( stageSize );
+ onTop.SetProperty( Actor::Property::SIZE, stageSize );
stage.Add( onTop );
onTop.RaiseToTop();
mGaussianBlurView = GaussianBlurView::New( 30, 8.0f, Pixel::RGBA8888, 0.5f, 0.5f, false );
mGaussianBlurView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mGaussianBlurView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mGaussianBlurView.SetSize( stage.GetSize() );
+ mGaussianBlurView.SetProperty( Actor::Property::SIZE, stage.GetSize() );
stage.Add( mGaussianBlurView );
mGaussianBlurView.Add( mImageView );
text.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
text.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
- text.SetPosition( position );
+ text.SetProperty( Actor::Property::POSITION, position );
text.SetProperty( DevelActor::Property::OPACITY, 0.0f );
text.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, Text::HorizontalAlignment::CENTER );
text.SetProperty( TextLabel::Property::MULTI_LINE, true );
// Create a control with a circular gradient that we'll use for the gestures and be a quarter of the size of the stage.
Actor touchControl = Control::New();
- touchControl.SetSize( stage.GetSize() * 0.25f );
+ touchControl.SetProperty( Actor::Property::SIZE, stage.GetSize() * 0.25f );
touchControl.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
touchControl.SetProperty( Control::Property::BACKGROUND, CONTROL_BACKGROUND );
background.Add( touchControl );
actor.GetProperty( Actor::Property::POSITION ).Get( currentPosition );
Vector3 newPosition = currentPosition + scaledDisplacement;
- actor.SetPosition( newPosition );
+ actor.SetProperty( Actor::Property::POSITION, newPosition );
switch( pan.state )
{
}
}
- actor.SetScale( mStartingScale * pinch.scale );
+ actor.SetProperty( Actor::Property::SCALE, mStartingScale * pinch.scale );
}
/**
textLabel.SetProperty( Dali::Actor::Property::NAME, "helloWorldLabel" );
stage.Add( textLabel );
-
- Actor parent = Actor::New();
- Vector4 parentColor( 1.0f, 0.5f, 0.0f, 0.8f );
- parent.SetProperty( Actor::Property::COLOR, parentColor );
- Stage::GetCurrent().Add( parent );
-
- Actor child = Actor::New();
- Vector4 childColor( 0.5f, 0.6f, 0.5f, 1.0f );
- child.SetProperty( Actor::Property::COLOR, childColor );
- parent.Add( child );
-
- std::string colorMode = static_cast<std::string>( child.GetProperty< std::string >( Actor::Property::COLOR_MODE ) );
- printf("color mode: %s, should be: %d\n", colorMode.c_str(), ColorMode::USE_OWN_MULTIPLY_PARENT_ALPHA );
-
- child.SetProperty( Actor::Property::COLOR_MODE, ColorMode::USE_PARENT_COLOR );
- colorMode = static_cast<std::string>( child.GetProperty< std::string >( Actor::Property::COLOR_MODE ) );
- printf("color mode: %s, should be: %d\n", colorMode.c_str(), ColorMode::USE_PARENT_COLOR );
-
// Respond to a click anywhere on the stage
stage.GetRootLayer().TouchSignal().Connect( this, &HelloWorldController::OnTouch );
{
float rowX = x * COL_WIDTH + PADDING;
float rowY = y * ROW_HEIGHT + PADDING;
- iconView.SetSize( Vector3( COL_WIDTH, ROW_HEIGHT, 1.0f ) );
- iconView.SetPosition( Vector3( rowX, rowY, 0.0f ) );
+ iconView.SetProperty( Actor::Property::SIZE, Vector3( COL_WIDTH, ROW_HEIGHT, 1.0f ) );
+ iconView.SetProperty( Actor::Property::POSITION, Vector3( rowX, rowY, 0.0f ) );
}
else
{
// Move page 'a little bit up'.
page.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
page.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- page.SetPosition( Vector3( stageSize.x * i, 0.0f, 0.0f ) );
+ page.SetProperty( Actor::Property::POSITION, Vector3( stageSize.x * i, 0.0f, 0.0f ) );
mScrollParent.Add( page );
}
mScrollParent.SetProperty( DevelActor::Property::OPACITY, 1.0f );
- mScrollParent.SetScale( Vector3::ONE );
+ mScrollParent.SetProperty( Actor::Property::SCALE, Vector3::ONE );
// Fade in.
ShowAnimation();
mNextButton.SetProperty( Button::Property::DISABLED_UNSELECTED_BACKGROUND_VISUAL, LOADING_IMAGE );
mNextButton.SetProperty( Button::Property::DISABLED_SELECTED_BACKGROUND_VISUAL, NEXT_BUTTON_DISABLED_IMAGE );
mNextButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
- mNextButton.SetY( -50.0f );
- mNextButton.SetSize( 100.0f, 100.0f );
+ mNextButton.SetProperty( Actor::Property::POSITION_Y, -50.0f );
+ mNextButton.SetProperty( Actor::Property::SIZE, Vector2( 100.0f, 100.0f ) );
mNextButton.ClickedSignal().Connect( this, &ImagePolicies::ChangeImageClicked );
mTable.AddChild( mNextButton, TableView::CellPosition( TableRowPlacement::NEXT_BUTTON, 0 ) );
mTable.SetCellPadding( Vector2( 2.0f, 2.0f ) );
Toolkit::ImageView background = Toolkit::ImageView::New();
background.SetProperty( Toolkit::ImageView::Property::IMAGE, backgroundImage );
background.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- background.SetSize( stage.GetSize() );
+ background.SetProperty( Actor::Property::SIZE, stage.GetSize() );
stage.Add( background );
BufferImage heightBackground = BufferImage::WHITE();
mDesiredBox = Toolkit::ImageView::New( BORDER_IMAGE );
background.Add( mDesiredBox );
- mDesiredBox.SetSize( stage.GetSize() * mImageStageScale );
+ mDesiredBox.SetProperty( Actor::Property::SIZE, stage.GetSize() * mImageStageScale );
mDesiredBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mDesiredBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mHeightBox.SetSize( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height );
+ mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) );
mHeightBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mHeightBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mWidthBox.SetSize( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height );
+ mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) );
mWidthBox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mWidthBox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
// Display the actor on the stage
mDesiredBox.Add( mImageView );
- mImageView.SetSize( stage.GetSize() * mImageStageScale );
+ mImageView.SetProperty( Actor::Property::SIZE, stage.GetSize() * mImageStageScale );
// Setup the pinch detector for scaling the desired image load dimensions:
mPinchDetector = PinchGestureDetector::New();
mGrabCorner.SetProperty( Dali::Actor::Property::NAME, "GrabCorner" );
mGrabCorner.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
mGrabCorner.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT );
- mGrabCorner.SetPosition( -BORDER_WIDTH, -BORDER_WIDTH );
+ mGrabCorner.SetProperty( Actor::Property::POSITION, Vector2( -BORDER_WIDTH, -BORDER_WIDTH ));
mGrabCorner.SetProperty( DevelActor::Property::OPACITY, 0.6f );
Layer grabCornerLayer = Layer::New();
// Last image button:
imagePrevious.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
imagePrevious.RotateBy( Radian(3.14159265358979323846f), Vector3( 0, 1.0f, 0 ) );
- imagePrevious.SetY( playWidth * 0.5f );
- imagePrevious.SetX( playWidth + playWidth * 0.5f );
+ imagePrevious.SetProperty( Actor::Property::POSITION_Y, playWidth * 0.5f );
+ imagePrevious.SetProperty( Actor::Property::POSITION_X, playWidth + playWidth * 0.5f );
imagePrevious.SetProperty( DevelActor::Property::OPACITY, 0.6f );
controlsLayer.Add( imagePrevious );
imagePrevious.SetProperty( Dali::Actor::Property::NAME, PREVIOUS_BUTTON_ID );
// Next image button:
Toolkit::ImageView imageNext = Toolkit::ImageView::New( DALI_ICON_PLAY, ImageDimensions( playWidth, playWidth ) );
imageNext.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT );
- imageNext.SetY( playWidth * 0.5f );
- imageNext.SetX( stage.GetSize().x - playWidth * 0.5f );
+ imageNext.SetProperty( Actor::Property::POSITION_Y, playWidth * 0.5f );
+ imageNext.SetProperty( Actor::Property::POSITION_X, stage.GetSize().x - playWidth * 0.5f );
imageNext.SetProperty( DevelActor::Property::OPACITY, 0.6f );
controlsLayer.Add( imageNext );
imageNext.SetProperty( Dali::Actor::Property::NAME, NEXT_BUTTON_ID );
modesGroupBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
modesGroupBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
- modesGroupBackground.SetPosition( 0.0f, 0.0f );
+ modesGroupBackground.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, 0.0f ));
controlsLayer.Add( modesGroupBackground );
popup.SetProperty( Dali::Actor::Property::NAME, "POPUP" );
popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- popup.SetSize( POPUP_WIDTH_DP, 0.0f );
+ popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) );
popup.OutsideTouchedSignal().Connect( this, &ImageScalingAndFilteringController::OnPopupOutsideTouched );
const char * const path = IMAGE_PATHS[ mCurrentPath ];
Stage stage = Stage::GetCurrent();
Size imageSize = stage.GetSize() * mImageStageScale;
- mImageView.SetSize( imageSize );
+ mImageView.SetProperty( Actor::Property::SIZE, imageSize );
Property::Map map;
map[Toolkit::ImageVisual::Property::URL] = path;
// Border size needs to be modified to take into account the width of the frame.
Vector2 borderScale( ( imageSize + Vector2( BORDER_WIDTH * 2.0f, BORDER_WIDTH * 2.0f ) ) / stage.GetSize() );
- mDesiredBox.SetSize( stage.GetSize() * borderScale );
+ mDesiredBox.SetProperty( Actor::Property::SIZE, stage.GetSize() * borderScale );
- mHeightBox.SetSize( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height );
- mWidthBox.SetSize( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height );
+ mHeightBox.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width, (stage.GetSize() * mImageStageScale).height ) );
+ mWidthBox.SetProperty( Actor::Property::SIZE, Vector2( (stage.GetSize() * mImageStageScale).width, stage.GetSize().height ) );
}
private:
void OnScrollViewRelayout(Actor actor)
{
// Make the height of the horizontal scroll bar to be the same as the width of scroll view.
- mScrollBarHorizontal.SetSize(Vector2(0.0f, mScrollView.GetRelayoutSize( Dimension::WIDTH) ));
+ mScrollBarHorizontal.SetProperty( Actor::Property::SIZE, Vector2(0.0f, mScrollView.GetRelayoutSize( Dimension::WIDTH) ));
}
/**
const Vector2 imagePosition = imageRegionCorner + Vector2( GRID_CELL_PADDING , GRID_CELL_PADDING ) + imageSize * 0.5f;
ImageView image = CreateImageView( imageSource.configuration.path, imageSize.x, imageSize.y, fittingMode );
- image.SetPosition( Vector3( imagePosition.x, imagePosition.y, 0 ) );
- image.SetSize( imageSize );
+ image.SetProperty( Actor::Property::POSITION, Vector3( imagePosition.x, imagePosition.y, 0 ) );
+ image.SetProperty( Actor::Property::SIZE, imageSize );
image.TouchSignal().Connect( this, &ImageScalingIrregularGridController::OnTouchImage );
image.ResourceReadySignal().Connect( this, &ImageScalingIrregularGridController::ResourceReadySignal );
mFittingModes[image.GetId()] = fittingMode;
float imageSize = 512.f;
Toolkit::ImageView imageView0 = CreateImageView( IMAGE_PATH );
- imageView0.SetSize(imageSize, imageSize);
+ imageView0.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) );
imageView0.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- imageView0.SetY( -imageSize*0.5f );
+ imageView0.SetProperty( Actor::Property::POSITION_Y, -imageSize*0.5f );
stage.Add(imageView0);
Toolkit::ImageView imageView1 = CreateImageView( redGreen0 );
imageView1.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- imageView1.SetSize(imageSize, imageSize);
+ imageView1.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) );
imageView0.Add(imageView1);
Toolkit::ImageView imageView2 = CreateImageView( IMAGE_PATH );
- imageView2.SetSize(imageSize, imageSize);
+ imageView2.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) );
imageView2.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- imageView2.SetY( imageSize*0.5f );
+ imageView2.SetProperty( Actor::Property::POSITION_Y, imageSize*0.5f );
stage.Add(imageView2);
Toolkit::ImageView imageView3 = CreateImageView( redGreen1);
imageView3.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- imageView3.SetSize(imageSize, imageSize);
+ imageView3.SetProperty( Actor::Property::SIZE, Vector2(imageSize, imageSize) );
imageView2.Add(imageView3);
imageView2.SetProperty( Toolkit::ImageView::Property::PRE_MULTIPLIED_ALPHA, true );
{
mImageView[i][j] = Toolkit::ImageView::New();
mImageView[i][j].SetProperty( Toolkit::ImageView::Property::IMAGE, propertyMap );
- mImageView[i][j].SetPosition( 50.f*(i-1), 50.f*(j-1) );
+ mImageView[i][j].SetProperty( Actor::Property::POSITION, Vector2( 50.f*(i-1), 50.f*(j-1) ));
}
mImageView[1][1].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mImageView[1][1].SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER );
- mImageView[1][1].SetScale( 1.f/3.f );
+ mImageView[1][1].SetProperty( Actor::Property::SCALE, 1.f/3.f );
mContent.Add( mImageView[1][1] );
mImageView[0][0].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mImageView[0][0].SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT );
- mImageView[0][0].SetPosition( -50.f, -50.f );
+ mImageView[0][0].SetProperty( Actor::Property::POSITION, Vector2( -50.f, -50.f ));
mImageView[1][1].Add( mImageView[0][0] );
mImageView[1][0].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
mStageBackground = Actor::New();
mStageBackground.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
mStageBackground.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
- mStageBackground.SetSize( stageSize.x, stageSize.y );
+ mStageBackground.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, stageSize.y ) );
stage.Add(mStageBackground);
// Push button, for changing the image set for displaying
for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ )
{
mSvgActor[i] = Toolkit::ImageView::New(SVG_IMAGES[mIndex+i]);
- mSvgActor[i].SetSize( mActorSize );
+ mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize );
mSvgActor[i].TranslateBy( Vector3( 0.0, stageSize.height * 0.05, 0.0f ) );
stage.Add( mSvgActor[i] );
}
{
for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED ; i++ )
{
- mSvgActor[i].SetSize(mActorSize);
- mSvgActor[i].SetPosition( Vector3::ZERO );
+ mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize);
+ mSvgActor[i].SetProperty( Actor::Property::POSITION, Vector3::ZERO );
mScale = 1.f;
}
for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ )
{
- mSvgActor[i].SetScale( scale );
+ mSvgActor[i].SetProperty( Actor::Property::SCALE, scale );
}
break;
}
mScale = mScale < MIN_SCALE ? MIN_SCALE : mScale;
for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ )
{
- mSvgActor[i].SetSize( mActorSize * mScale );
- mSvgActor[i].SetScale( 1.0f );
+ mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize * mScale );
+ mSvgActor[i].SetProperty( Actor::Property::SCALE, 1.0f );
}
break;
}
}
for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ )
{
- mSvgActor[i].SetSize( mActorSize * mScale );
+ mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize * mScale );
}
}
else if( strcmp(keyName, "Right") == 0 )
}
for( unsigned int i = 0; i < NUM_IMAGES_DISPLAYED; i++ )
{
- mSvgActor[i].SetSize( mActorSize * mScale );
+ mSvgActor[i].SetProperty( Actor::Property::SIZE, mActorSize * mScale );
}
}
}
// create actor to render input with applied shader
mActorForInput = Toolkit::ImageView::New( url );
mActorForInput.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- mActorForInput.SetSize(TARGET_SIZE);
+ mActorForInput.SetProperty( Actor::Property::SIZE, TARGET_SIZE);
Property::Map customShader;
customShader[Toolkit::Visual::Shader::Property::FRAGMENT_SHADER] = FILTER_FRAGMENT_SOURCE;
Property::Map visualMap;
Toolkit::TextLabel instructions = Toolkit::TextLabel::New( EXAMPLE_INSTRUCTIONS );
instructions.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
instructions.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_CENTER);
- instructions.SetY(-50.0f);
+ instructions.SetProperty( Actor::Property::POSITION_Y, -50.0f);
instructions.SetProperty( Toolkit::TextLabel::Property::ENABLE_AUTO_SCROLL, true );
instructions.SetProperty( Toolkit::TextLabel::Property::AUTO_SCROLL_LOOP_COUNT, 10 );
mContentLayer.Add(instructions);
mDeleteButton = Toolkit::PushButton::New();
mDeleteButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
mDeleteButton.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
- mDeleteButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER );
+ mDeleteButton.SetProperty( Actor::Property::POSITION, Vector2( BUTTON_BORDER, BUTTON_BORDER ));
mDeleteButton.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
mDeleteButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, DELETE_IMAGE );
mDeleteButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, DELETE_IMAGE_SELECTED );
mDeleteButton.SetProperty( Toolkit::Control::Property::BACKGROUND, TOOLBAR_IMAGE );
- mDeleteButton.SetSize( Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) );
+ mDeleteButton.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) );
mDeleteButton.ClickedSignal().Connect( this, &ItemViewExample::OnDeleteButtonClicked);
mDeleteButton.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
mDeleteButton.SetProperty( Actor::Property::VISIBLE, false );
mInsertButton = Toolkit::PushButton::New();
mInsertButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
mInsertButton.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
- mInsertButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER );
+ mInsertButton.SetProperty( Actor::Property::POSITION, Vector2( BUTTON_BORDER, BUTTON_BORDER ));
mInsertButton.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
mInsertButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, INSERT_IMAGE );
mInsertButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, INSERT_IMAGE_SELECTED );
mInsertButton.SetProperty( Toolkit::Control::Property::BACKGROUND, TOOLBAR_IMAGE );
- mInsertButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f );
+ mInsertButton.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) );
mInsertButton.ClickedSignal().Connect( this, &ItemViewExample::OnInsertButtonClicked);
mInsertButton.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
mInsertButton.SetProperty( Actor::Property::VISIBLE, false );
mReplaceButton = Toolkit::PushButton::New();
mReplaceButton.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::BOTTOM_RIGHT);
mReplaceButton.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::BOTTOM_RIGHT);
- mReplaceButton.SetPosition( BUTTON_BORDER, BUTTON_BORDER );
+ mReplaceButton.SetProperty( Actor::Property::POSITION, Vector2( BUTTON_BORDER, BUTTON_BORDER ));
mReplaceButton.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
mReplaceButton.SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, REPLACE_IMAGE );
mReplaceButton.SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, REPLACE_IMAGE_SELECTED );
mReplaceButton.SetProperty( Toolkit::Control::Property::BACKGROUND, TOOLBAR_IMAGE );
- mReplaceButton.SetSize( stageSize.width * 0.15f, stageSize.width * 0.15f );
+ mReplaceButton.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width * 0.15f, stageSize.width * 0.15f ) );
mReplaceButton.ClickedSignal().Connect( this, &ItemViewExample::OnReplaceButtonClicked);
mReplaceButton.SetProperty( Actor::Property::LEAVE_REQUIRED, true );
mReplaceButton.SetProperty( Actor::Property::VISIBLE, false );
propertyMap.Insert(DevelVisual::Property::VISUAL_FITTING_MODE, DevelVisual::FILL);
ImageView actor = ImageView::New();
actor.SetProperty( Toolkit::ImageView::Property::IMAGE, propertyMap );
- actor.SetZ( 0.0f );
- actor.SetPosition( INITIAL_OFFSCREEN_POSITION );
+ actor.SetProperty( Actor::Property::POSITION_Z, 0.0f );
+ actor.SetProperty( Actor::Property::POSITION, INITIAL_OFFSCREEN_POSITION );
// Add a border image child actor
ImageView borderActor = ImageView::New();
checkbox.SetProperty( Actor::Property::COLOR_MODE, USE_PARENT_COLOR );
checkbox.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
checkbox.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT );
- checkbox.SetSize( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f );
- checkbox.SetPosition( -SELECTION_BORDER_WIDTH, SELECTION_BORDER_WIDTH );
- checkbox.SetZ( 0.1f );
+ checkbox.SetProperty( Actor::Property::SIZE, Vector2( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ) );
+ checkbox.SetProperty( Actor::Property::POSITION, Vector2( -SELECTION_BORDER_WIDTH, SELECTION_BORDER_WIDTH ));
+ checkbox.SetProperty( Actor::Property::POSITION_Z, 0.1f );
Property::Map solidColorProperty;
solidColorProperty.Insert( Toolkit::Visual::Property::TYPE, Visual::COLOR );
tick.SetProperty( Actor::Property::COLOR_MODE, USE_PARENT_COLOR );
tick.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
tick.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_RIGHT );
- tick.SetSize( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f );
- tick.SetZ( 0.2f );
+ tick.SetProperty( Actor::Property::SIZE, Vector2( spiralItemSize.width * 0.2f, spiralItemSize.width * 0.2f ) );
+ tick.SetProperty( Actor::Property::POSITION_Z, 0.2f );
tick.SetProperty( Actor::Property::VISIBLE, false );
checkbox.Add( tick );
mMeshActor = Actor::New();
mMeshActor.AddRenderer( mRenderer );
- mMeshActor.SetSize(200, 200);
+ mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(200, 200) );
Property::Index morphAmountIndex = mMeshActor.RegisterProperty( "uMorphAmount", 0.0f );
modeSelectTableView.SetFitHeight( 1 );
modeSelectTableView.SetFitHeight( 2 );
modeSelectTableView.SetCellPadding( Vector2( 6.0f, 0.0f ) );
- modeSelectTableView.SetScale( Vector3( 0.8f, 0.8f, 0.8f ));
+ modeSelectTableView.SetProperty( Actor::Property::SCALE, Vector3( 0.8f, 0.8f, 0.8f ));
const char* labels[] =
{
Layer overlay = Layer::New();
overlay.SetProperty( Actor::Property::SENSITIVE,false);
overlay.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- overlay.SetSize(mStageSize);
+ overlay.SetProperty( Actor::Property::SIZE, mStageSize);
Stage::GetCurrent().Add(overlay);
mMagnifier = Toolkit::Magnifier::New();
mMagnifier.SetSourceActor( mView );
- mMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
+ mMagnifier.SetProperty( Actor::Property::SIZE, MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
mMagnifier.SetProperty( Toolkit::Magnifier::Property::MAGNIFICATION_FACTOR, MAGNIFICATION_FACTOR );
- mMagnifier.SetScale(Vector3::ZERO);
+ mMagnifier.SetProperty( Actor::Property::SCALE,Vector3::ZERO);
overlay.Add( mMagnifier );
// Apply constraint to animate the position of the magnifier.
// Create bouncing magnifier automatically bounces around screen.
mBouncingMagnifier = Toolkit::Magnifier::New();
mBouncingMagnifier.SetSourceActor( mView );
- mBouncingMagnifier.SetSize( MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
+ mBouncingMagnifier.SetProperty( Actor::Property::SIZE, MAGNIFIER_SIZE * mStageSize.width ); // Size of magnifier is in relation to stage width
mBouncingMagnifier.SetProperty( Toolkit::Magnifier::Property::MAGNIFICATION_FACTOR, MAGNIFICATION_FACTOR );
overlay.Add( mBouncingMagnifier );
Vector3 glassPosition(position);
glassPosition.y -= mStageSize.width * MAGNIFIER_SIZE.height * 0.5f + Stage::GetCurrent().GetDpi().height * FINGER_RADIUS_INCHES;
- mMagnifier.SetPosition( glassPosition );
+ mMagnifier.SetProperty( Actor::Property::POSITION, glassPosition );
}
void OnKeyEvent(const KeyEvent& event)
mMeshActor = Actor::New();
mMeshActor.AddRenderer( mRenderer );
- mMeshActor.SetSize(400, 400);
+ mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) );
Property::Index morphDeltaIndex = mMeshActor.RegisterProperty( "uDelta", 0.f );
//Set position relative to top left, as the light source property is also relative to the top left.
mLightSource.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mLightSource.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mLightSource.SetPosition( Stage::GetCurrent().GetSize().x * 0.85f, Stage::GetCurrent().GetSize().y * 0.125 );
+ mLightSource.SetProperty( Actor::Property::POSITION, Vector2( Stage::GetCurrent().GetSize().x * 0.85f, Stage::GetCurrent().GetSize().y * 0.125 ));
//Supply an image to represent the light.
SetLightImage();
case LIGHT_TAG: //Drag light
{
//Set light source to new position and update the models accordingly.
- mLightSource.SetPosition( Vector3( touch.GetScreenPosition( 0 ) ) );
+ mLightSource.SetProperty( Actor::Property::POSITION, Vector3( touch.GetScreenPosition( 0 ) ) );
UpdateLight();
break;
mMetaballs[i].actor = Actor::New( );
mMetaballs[i].actor.SetProperty( Dali::Actor::Property::NAME, "Metaball" );
- mMetaballs[i].actor.SetScale( 1.0f );
+ mMetaballs[i].actor.SetProperty( Actor::Property::SCALE, 1.0f );
mMetaballs[i].actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mMetaballs[i].actor.AddRenderer( renderer );
// Create actor
mCompositionActor = Actor::New( );
mCompositionActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- mCompositionActor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
- mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y);
+ mCompositionActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
+ mCompositionActor.SetProperty( Actor::Property::SIZE, Vector2(mScreenSize.x, mScreenSize.y) );
mCompositionActor.AddRenderer( mRenderer );
Vector2 metaballCenter(0.0,0);
SetPositionToMetaballs( metaballCenter );
- mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y);
+ mCompositionActor.SetProperty( Actor::Property::SIZE, Vector2(mScreenSize.x, mScreenSize.y) );
Stage stage = Stage::GetCurrent();
stage.Add( mCompositionActor );
mMetaballs[i].actor = Actor::New();
mMetaballs[i].actor.SetProperty( Dali::Actor::Property::NAME, "Metaball" );
- mMetaballs[i].actor.SetScale( 1.0f );
+ mMetaballs[i].actor.SetProperty( Actor::Property::SCALE, 1.0f );
mMetaballs[i].actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// Create actor
mCompositionActor = Actor::New( );
mCompositionActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
- mCompositionActor.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
- mCompositionActor.SetSize(mScreenSize.x, mScreenSize.y);
+ mCompositionActor.SetProperty( Actor::Property::POSITION, Vector3(0.0f, 0.0f, 0.0f));
+ mCompositionActor.SetProperty( Actor::Property::SIZE, Vector2(mScreenSize.x, mScreenSize.y) );
// Create geometry
Geometry metaballGeometry = CreateGeometry( false );
mModel3dView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mModel3dView.SetProperty( Dali::Actor::Property::NAME, "model3dViewControl" );
mModel3dView.SetResizePolicy(ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS);
- mModel3dView.SetSize(screenSize);
+ mModel3dView.SetProperty( Actor::Property::SIZE, screenSize);
mModel3dView.SetProperty(Model3dView::Property::LIGHT_POSITION, Vector3(5,10.,0));
{
if (mScaled)
{
- mModel3dView.SetScale(1.0);
- mModel3dView.SetPosition(0,0,0);
+ mModel3dView.SetProperty( Actor::Property::SCALE, 1.0f );
+ mModel3dView.SetProperty( Actor::Property::POSITION, Vector3( 0, 0, 0 ) );
mScaled = false;
}
else
float size = 2.5;
- mModel3dView.SetScale(size);
- mModel3dView.SetPosition(-position.x * size,-position.y * size, 0);
+ mModel3dView.SetProperty( Actor::Property::SCALE, size );
+ mModel3dView.SetProperty( Actor::Property::POSITION, Vector3( -position.x * size, -position.y * size, 0 ) );
mScaled = true;
}
}
// Ensure the content layer is a square so the touch area works in all orientations
Vector2 stageSize = Stage::GetCurrent().GetSize();
float size = std::max( stageSize.width, stageSize.height );
- mContentLayer.SetSize( size, size );
+ mContentLayer.SetProperty( Actor::Property::SIZE, Vector2( size, size ) );
//Add an effects icon on the right of the title
mActorEffectsButton = Toolkit::PushButton::New();
mMotionBlurImageView = ImageView::New();
SetImageFittedInBox( mMotionBlurImageView, mMotionBlurEffect, MOTION_BLUR_ACTOR_IMAGE1, mMotionBlurActorSize.x, mMotionBlurActorSize.y );
mMotionBlurImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mMotionBlurImageView.SetSize(mMotionBlurActorSize.x, mMotionBlurActorSize.y);
+ mMotionBlurImageView.SetProperty( Actor::Property::SIZE, Vector2(mMotionBlurActorSize.x, mMotionBlurActorSize.y) );
mContentLayer.Add( mMotionBlurImageView );
}
else
{
- mView.SetSize( targetSize );
+ mView.SetProperty( Actor::Property::SIZE, targetSize );
}
}
else
{
// for first time just set size
- mView.SetSize( targetSize );
+ mView.SetProperty( Actor::Property::SIZE, targetSize );
}
}
// Ensure the content layer is a square so the touch area works in all orientations
Vector2 stageSize = Stage::GetCurrent().GetSize();
float size = std::max( stageSize.width, stageSize.height );
- mContentLayer.SetSize( size, size );
+ mContentLayer.SetProperty( Actor::Property::SIZE, Vector2( size, size ) );
//Add an slideshow icon on the right of the title
mActorEffectsButton = Toolkit::PushButton::New();
mMotionStretchImageView.SetProperty( Toolkit::ImageView::Property::IMAGE, mMotionStretchEffect );
mMotionStretchImageView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mMotionStretchImageView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mMotionStretchImageView.SetSize( MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT );
+ mMotionStretchImageView.SetProperty( Actor::Property::SIZE, Vector2( MOTION_STRETCH_ACTOR_WIDTH, MOTION_STRETCH_ACTOR_HEIGHT ) );
mContentLayer.Add( mMotionStretchImageView );
}
else
{
- mView.SetSize( targetSize );
+ mView.SetProperty( Actor::Property::SIZE, targetSize );
}
}
else
{
// for first time just set size
- mView.SetSize( targetSize );
+ mView.SetProperty( Actor::Property::SIZE, targetSize );
}
}
Vector2 stageSize = stage.GetSize();
mButtonArea = Layer::New();
- mButtonArea.SetSize( stageSize.x, BUTTON_HEIGHT );
+ mButtonArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, BUTTON_HEIGHT ) );
mButtonArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
mButtonArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
stage.Add( mButtonArea );
mButtonShow.SetProperty( Toolkit::Button::Property::LABEL, "SHOW" );
mButtonShow.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mButtonShow.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mButtonShow.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT );
+ mButtonShow.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) );
mButtonShow.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected );
mButtonArea.Add( mButtonShow );
mButtonRefreshAlways.SetProperty( Toolkit::Button::Property::LABEL, "ALWAYS" );
mButtonRefreshAlways.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mButtonRefreshAlways.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mButtonRefreshAlways.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT );
- mButtonRefreshAlways.SetPosition( (stageSize.x / BUTTON_COUNT)*1.0f, 0.0f );
+ mButtonRefreshAlways.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) );
+ mButtonRefreshAlways.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*1.0f, 0.0f ));
mButtonRefreshAlways.StateChangedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected );
mButtonArea.Add( mButtonRefreshAlways );
mButtonRefreshOnce.SetProperty( Toolkit::Button::Property::LABEL, "ONCE" );
mButtonRefreshOnce.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mButtonRefreshOnce.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mButtonRefreshOnce.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT );
- mButtonRefreshOnce.SetPosition( (stageSize.x / BUTTON_COUNT)*2.0f, 0.0f );
+ mButtonRefreshOnce.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) );
+ mButtonRefreshOnce.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*2.0f, 0.0f ));
mButtonRefreshOnce.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected );
mButtonArea.Add( mButtonRefreshOnce );
mButtonCapture.SetProperty( Toolkit::Button::Property::LABEL, "CAPTURE" );
mButtonCapture.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mButtonCapture.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mButtonCapture.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT );
- mButtonCapture.SetPosition( (stageSize.x / BUTTON_COUNT)*3.0f, 0.0f );
+ mButtonCapture.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) );
+ mButtonCapture.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*3.0f, 0.0f ));
mButtonCapture.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected );
mButtonArea.Add( mButtonCapture );
mButtonReset.SetProperty( Toolkit::Button::Property::LABEL, "RESET" );
mButtonReset.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
mButtonReset.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mButtonReset.SetSize( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT );
- mButtonReset.SetPosition( (stageSize.x / BUTTON_COUNT)*4.0f, 0.0f );
+ mButtonReset.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x / BUTTON_COUNT, BUTTON_HEIGHT ) );
+ mButtonReset.SetProperty( Actor::Property::POSITION, Vector2( (stageSize.x / BUTTON_COUNT)*4.0f, 0.0f ));
mButtonReset.ClickedSignal().Connect( this, &NativeImageSourceController::OnButtonSelected );
mButtonArea.Add( mButtonReset );
}
float contentHeight( (stageSize.y - BUTTON_HEIGHT)/2.0f );
mTopContentArea = Actor::New();
- mTopContentArea.SetSize( stageSize.x, contentHeight );
+ mTopContentArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, contentHeight ) );
mTopContentArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
mTopContentArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
- mTopContentArea.SetY( BUTTON_HEIGHT );
+ mTopContentArea.SetProperty( Actor::Property::POSITION_Y, BUTTON_HEIGHT );
stage.Add( mTopContentArea );
mBottomContentArea = Actor::New();
- mBottomContentArea.SetSize( stageSize.x, contentHeight );
+ mBottomContentArea.SetProperty( Actor::Property::SIZE, Vector2( stageSize.x, contentHeight ) );
mBottomContentArea.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
mBottomContentArea.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
stage.Add( mBottomContentArea );
renderer.SetTextures( textureSet );
mDisplayActor.AddRenderer( renderer );
- mDisplayActor.SetSize( mNativeTexture.GetWidth(), mNativeTexture.GetHeight() );
+ mDisplayActor.SetProperty( Actor::Property::SIZE, Vector2( mNativeTexture.GetWidth(), mNativeTexture.GetHeight() ) );
mBottomContentArea.Add( mDisplayActor );
}
propertyMap.Insert(Toolkit::DevelVisual::Property::VISUAL_FITTING_MODE, Toolkit::DevelVisual::FILL);
mImageView[i].SetProperty(Toolkit::ImageView::Property::IMAGE, propertyMap);
- mImageView[i].SetSize( Vector3(0.0f,0.0f,0.0f) );
+ mImageView[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) );
mImageView[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
mParent.Add( mImageView[i] );
}
{
mActor[i] = Actor::New();
mActor[i].AddRenderer( renderers[i % numImages] );
- mActor[i].SetSize(0.0f,0.0f,0.0f);
+ mActor[i].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) );
mParent.Add(mActor[i]);
}
}
}
if( gUseMesh )
{
- mActor[count].SetPosition( initialPosition );
- mActor[count].SetSize( Vector3(0.0f,0.0f,0.0f) );
+ mActor[count].SetProperty( Actor::Property::POSITION, initialPosition );
+ mActor[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) );
mActor[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian( 0.0f ), Vector3::XAXIS ) ) );
mShow.AnimateTo( Property( mActor[count], Actor::Property::POSITION ), Vector3( xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) );
mShow.AnimateTo( Property( mActor[count], Actor::Property::SIZE ), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) );
}
else
{
- mImageView[count].SetPosition( initialPosition );
- mImageView[count].SetSize( Vector3(0.0f,0.0f,0.0f) );
+ mImageView[count].SetProperty( Actor::Property::POSITION, initialPosition );
+ mImageView[count].SetProperty( Actor::Property::SIZE, Vector3(0.0f,0.0f,0.0f) );
mImageView[count].SetProperty( Actor::Property::ORIENTATION, Quaternion( Quaternion( Radian(0.0f), Vector3::XAXIS ) ) );
mShow.AnimateTo( Property( mImageView[count], Actor::Property::POSITION ), Vector3( xpos+mSize.x*0.5f, ypos+mSize.y*0.5f, 0.0f ), AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) );
mShow.AnimateTo( Property( mImageView[count], Actor::Property::SIZE ), mSize, AlphaFunction::EASE_OUT_BACK, TimePeriod( delay, duration ) );
mMeshActor = Actor::New();
mMeshActor.AddRenderer( mRenderer );
- mMeshActor.SetSize(400, 400);
+ mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) );
mMeshActor.RegisterProperty( "uFadeColor", Color::GREEN );
if( modifySize )
{
// The size is set once at the end.
- popup.SetSize( Vector2( newSize[ 0 ], newSize[ 1 ] ) );
+ popup.SetProperty( Actor::Property::SIZE, Vector2( newSize[ 0 ], newSize[ 1 ] ) );
}
}
popup.SetProperty( Dali::Actor::Property::NAME, "popup" );
popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- popup.SetSize( POPUP_WIDTH_DP, 0.0f );
+ popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) );
popup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, false );
popup.OutsideTouchedSignal().Connect( this, &PopupExample::HidePopup );
// Set up the container's layout.
footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
- footer.SetSize( 0.0f, 130.0f );
+ footer.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 130.0f ) );
footer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
footer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mPopup.Add( text );
// Fix the popup's size.
- mPopup.SetSize( 240.0f, 400.0f );
+ mPopup.SetProperty( Actor::Property::SIZE, Vector2( 240.0f, 400.0f ) );
mPopup.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
SetupPopup( mPopup, button );
root.SetProperty( Actor::Property::PADDING, Padding( 0.0f, 0.0f, 0.0f, 20.0f ) );
Toolkit::CheckBoxButton checkBox = Toolkit::CheckBoxButton::New();
- checkBox.SetSize( 48, 48 );
+ checkBox.SetProperty( Actor::Property::SIZE, Vector2( 48, 48 ) );
root.AddChild( checkBox, Toolkit::TableView::CellPosition( 0, 0 ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Don't show again" );
auto label = TextLabel::New(text);
label.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
label.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- label.SetSize( 300,TEXT_HEIGHT );
- label.SetY( yIndex*TEXT_HEIGHT );
+ label.SetProperty( Actor::Property::SIZE, Vector2( 300,TEXT_HEIGHT ) );
+ label.SetProperty( Actor::Property::POSITION_Y, yIndex*TEXT_HEIGHT );
textContainer.Add( label );
}
mSpinner = TextLabel::New("");
mSpinner.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mSpinner.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- mSpinner.SetSize(100,100);
+ mSpinner.SetProperty( Actor::Property::SIZE, Vector2(100,100) );
mStage.Add(mSpinner);
mStage.Add(textContainer);
mSceneAnimation.SetLooping(true);
mSceneAnimation.Play();
- mSceneActor.SetSize(250.0f, 250.0f);
- mSceneActor.SetPosition(0.0f, 0.0f, 130.0f);
+ mSceneActor.SetProperty( Actor::Property::SIZE, Vector2(250.0f, 250.0f) );
+ mSceneActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 130.0f ) );
Quaternion p( Degree( -6.0f ), Vector3::XAXIS );
Quaternion q( Degree( 20.0f ), Vector3::YAXIS );
mSceneActor.SetProperty( Actor::Property::ORIENTATION, p * q );
contentTable.SetFitHeight( i );
}
- contentTable.SetPosition( 0.0f, TOP_MARGIN );
+ contentTable.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, TOP_MARGIN ));
mContentLayer.Add( contentTable );
// Image selector for progress bar
stage.GetRenderTaskList().GetTask(0).SetClearEnabled(false);
mLayer3D = Layer::New();
- mLayer3D.SetSize( stageWidth, stageHeight );
+ mLayer3D.SetProperty( Actor::Property::SIZE, Vector2( stageWidth, stageHeight ) );
stage.Add(mLayer3D);
mLayer3D.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
Actor panScreen = Actor::New();
auto stageSize = stage.GetSize();
- panScreen.SetSize( stageSize.width, stageSize.height );
+ panScreen.SetProperty( Actor::Property::SIZE, Vector2( stageSize.width, stageSize.height ) );
panScreen.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
panScreen.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
auto camera2d = stage.GetRenderTaskList().GetTask(0).GetCameraActor();
- panScreen.SetPosition( 0, 0, camera2d.GetNearClippingPlane() );
+ panScreen.SetProperty( Actor::Property::POSITION, Vector3( 0, 0, camera2d.GetNearClippingPlane() ));
camera2d.Add(panScreen);
camera2d.RotateBy( Degree(180.0f), Vector3( 0.0, 1.0, 0.0 ) );
mPanGestureDetector = PanGestureDetector::New();
{
auto actor = node.cameraId != 0xffffffff ? CameraActor::New( stage.GetSize() ) : Actor::New();
- actor.SetSize( 1, 1, 1 );
+ actor.SetProperty( Actor::Property::SIZE, Vector3( 1, 1, 1 ) );
actor.SetProperty( Dali::Actor::Property::NAME, node.name );
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actor.SetPosition( node.translation[0], node.translation[1], node.translation[2] );
- actor.SetScale( node.scale[0], node.scale[1], node.scale[2] );
+ actor.SetProperty( Actor::Property::POSITION, Vector3( node.translation[0], node.translation[1], node.translation[2] ));
+ actor.SetProperty( Actor::Property::SCALE, Vector3( node.scale[0], node.scale[1], node.scale[2] ) );
actor.SetProperty( Actor::Property::ORIENTATION, Quaternion(node.rotationQuaternion[3],
node.rotationQuaternion[0],
node.rotationQuaternion[1],
mMeshActor = Actor::New();
mMeshActor.AddRenderer( mRenderer );
- mMeshActor.SetSize( stageSize );
+ mMeshActor.SetProperty( Actor::Property::SIZE, stageSize );
mMeshActor.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
mContent.Add( mMeshActor );
mImageView1.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView1.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
mImageView1.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
- mImageView1.SetPosition(0, 100);
+ mImageView1.SetProperty( Actor::Property::POSITION, Vector2(0, 100));
mImageView1.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView1);
mImageView2.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView2.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
mImageView2.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
- mImageView2.SetPosition(400, 100);
+ mImageView2.SetProperty( Actor::Property::POSITION, Vector2(400, 100));
mImageView2.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView2);
mImageView3.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView3.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
mImageView3.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
- mImageView3.SetPosition(0, 400);
+ mImageView3.SetProperty( Actor::Property::POSITION, Vector2(0, 400));
mImageView3.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView3);
mImageView4.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView4.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
mImageView4.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
- mImageView4.SetPosition(400, 400);
+ mImageView4.SetProperty( Actor::Property::POSITION, Vector2(400, 400));
mImageView4.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView4);
mImageView4.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
mImageView5.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_CENTER);
mImageView5.SetProperty(DevelActor::Property::POSITION_USES_ANCHOR_POINT, false);
- mImageView5.SetPosition(800, 100);
+ mImageView5.SetProperty( Actor::Property::POSITION, Vector2(800, 100));
mImageView5.SetBackgroundColor(Vector4(0.0f, 0.0f, 0.0f, 0.0f));
stage.Add(mImageView5);
Toolkit::Control container = Toolkit::Control::New();
container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
- container.SetSize( size );
+ container.SetProperty( Actor::Property::SIZE, Vector2( size ) );
container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
// Create a renderer from the geometry and add the texture.
Toolkit::Control container = Toolkit::Control::New();
container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
- container.SetSize( size );
+ container.SetProperty( Actor::Property::SIZE, Vector2( size ) );
container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
// Create a renderer from the geometry and add the texture.
Toolkit::Control container = Toolkit::Control::New();
container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- container.SetSize( size );
+ container.SetProperty( Actor::Property::SIZE, Vector2( size ) );
container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
// We rotate the plane as the geometry is created flat in X & Y. We want it to span X & Z axis.
Toolkit::Control container = Toolkit::Control::New();
container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
container.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
- container.SetSize( size );
+ container.SetProperty( Actor::Property::SIZE, Vector2( size ) );
container.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
// Create the cube geometry of unity size.
mLabel = TextLabel::New( material[MaterialID].name );
mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, Vector3( 0.5f, 0.0f, 0.5f ) );
- mLabel.SetSize( stage.GetSize().x * 0.5f, stage.GetSize().y * 0.083f );
+ mLabel.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().x * 0.5f, stage.GetSize().y * 0.083f ) );
mLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Vector4( 1.0f, 1.0f, 1.0f, 1.0f ));
mActor.SetProperty( Actor::Property::COLOR, Vector4( 1.0f, 1.0f, 0.6f, 1.0f ) );
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) );
+ mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) );
mActor.AddRenderer( mRenderer );
stage.Add( mActor );
}
mActor = Actor::New();
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActor.SetPosition( position );
- mActor.SetSize( size );
+ mActor.SetProperty( Actor::Property::POSITION, position );
+ mActor.SetProperty( Actor::Property::SIZE, size );
mActor.AddRenderer( renderer );
}
mActor = Actor::New();
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActor.SetSize( size );
+ mActor.SetProperty( Actor::Property::SIZE, size );
mActor.AddRenderer( renderer );
}
mLabel = TextLabel::New( "R:1 M:0" );
mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
- mLabel.SetSize( stage.GetSize().width * 0.5f, stage.GetSize().height * 0.083f );
+ mLabel.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width * 0.5f, stage.GetSize().height * 0.083f ) );
mLabel.SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mLabel.SetProperty( TextLabel::Property::VERTICAL_ALIGNMENT, "CENTER" );
mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::WHITE );
mUiRoot.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::TOP_LEFT);
mUiRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::TOP_LEFT);
- mUiRoot.SetSize(stage.GetSize());
+ mUiRoot.SetProperty( Actor::Property::SIZE, stage.GetSize());
m3dRoot.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
m3dRoot.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
// Setting camera parameters for 3D Scene
- mSkybox.GetActor().SetPosition( CAMERA_DEFAULT_POSITION );
+ mSkybox.GetActor().SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION );
CameraActor camera3d = stage.GetRenderTaskList().GetTask(0).GetCameraActor();
camera3d.SetInvertYAxis( true );
- camera3d.SetPosition( CAMERA_DEFAULT_POSITION );
+ camera3d.SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION );
camera3d.SetNearClippingPlane( CAMERA_DEFAULT_NEAR );
camera3d.SetFarClippingPlane( CAMERA_DEFAULT_FAR );
camera3d.SetFieldOfView( Radian( Degree( CAMERA_DEFAULT_FOV ) ) );
mActor = Actor::New();
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) );
- mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) );
+ mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) );
+ mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) );
mActor.AddRenderer( mRenderer );
stage.Add( mActor );
}
mActor = Actor::New();
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) );
+ mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) );
mActor.SetProperty( Actor::Property::COLOR, Color::BLACK );
- mActor.SetSize( Vector3( size.x, size.x, size.x ) );
+ mActor.SetProperty( Actor::Property::SIZE, Vector3( size.x, size.x, size.x ) );
mActor.AddRenderer( mRenderer );
stage.Add( mActor );
}
mActor = Actor::New();
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActor.SetSize( Vector2( TEXTURE_WIDTH, TEXTURE_HEIGHT ) );
+ mActor.SetProperty( Actor::Property::SIZE, Vector2( TEXTURE_WIDTH, TEXTURE_HEIGHT ) );
mActor.RegisterProperty("uProgress", float(1.0f) );
stage.Add( mActor );
// should be read from file
mCameraActor.SetNearClippingPlane( mNear );
mCameraActor.SetFarClippingPlane( mFar );
- mCameraActor.SetPosition( mCameraPosition );
+ mCameraActor.SetProperty( Actor::Property::POSITION, mCameraPosition );
}
void LookCamera::CreateInterceptorActor()
mInterceptorActor = Actor::New();
mInterceptorActor.SetProperty( Dali::Actor::Property::NAME, "InputInterceptor" );
- mInterceptorActor.SetSize( Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) );
- mInterceptorActor.SetPosition( Vector3( 0.0, 0.0, 1.0 ) );
+ mInterceptorActor.SetProperty( Actor::Property::SIZE, Vector3( stage.GetSize().x, stage.GetSize().y, 1 ) );
+ mInterceptorActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0, 0.0, 1.0 ) );
mInterceptorActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mInterceptorActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mCameraActor.Add( mInterceptorActor );
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mActor.AddRenderer( mRenderer );
- mActor.SetSize( 10.f, 10.f, 10.f );
+ mActor.SetProperty( Actor::Property::SIZE, Vector3( 10.f, 10.f, 10.f ) );
Stage stage = Stage::GetCurrent();
stage.Add( mActor );
mSkyboxActor.SetProperty( Dali::Actor::Property::NAME, "SkyBox" );
mSkyboxActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mSkyboxActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mSkyboxActor.SetPosition( CAMERA_DEFAULT_POSITION );
+ mSkyboxActor.SetProperty( Actor::Property::POSITION, CAMERA_DEFAULT_POSITION );
mSkyboxActor.AddRenderer( mSkyboxRenderer );
stage.Add( mSkyboxActor );
}
mActor = Actor::New();
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) );
- mActor.SetSize( Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) );
+ mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) );
+ mActor.SetProperty( Actor::Property::SIZE, Vector3( quarterStageWidth, quarterStageWidth, quarterStageWidth ) );
mActor.AddRenderer( mRenderer );
stage.Add( mActor );
}
mActor = Actor::New();
mActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mActor.SetPosition( Vector3( 0.0f, 0.0f, 0.0f ) );
+ mActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) );
mActor.SetProperty( Actor::Property::COLOR, Color::RED );
- mActor.SetSize( Vector3( size.x, size.x, size.x ) );
+ mActor.SetProperty( Actor::Property::SIZE, Vector3( size.x, size.x, size.x ) );
mActor.AddRenderer( mRenderer );
stage.Add( mActor );
}
mScrollView.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
mScrollView.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
mContentLayer.Add( mScrollView );
- mScrollView.SetSize( stageSize );
+ mScrollView.SetProperty( Actor::Property::SIZE, stageSize );
mScrollView.SetAxisAutoLock( true );
mScrollView.SetAxisAutoLockGradient( 1.0f );
{
Actor page = CreatePage();
- page.SetPosition( column * stageSize.x, row * stageSize.y );
+ page.SetProperty( Actor::Property::POSITION, Vector2( column * stageSize.x, row * stageSize.y ));
mScrollView.Add( page );
mPages.push_back(page);
Vector3 position( margin * 0.5f + (imageSize.x + margin) * column - stageSize.width * 0.5f,
margin * 0.5f + (imageSize.y + margin) * row - stageSize.height * 0.5f,
0.0f);
- image.SetPosition( position + imageSize * 0.5f );
- image.SetSize( imageSize );
+ image.SetProperty( Actor::Property::POSITION, position + imageSize * 0.5f );
+ image.SetProperty( Actor::Property::SIZE, imageSize );
page.Add(image);
}
}
toolBar.AddControl( resetButton, DemoHelper::DEFAULT_VIEW_STYLE.mToolBarButtonPercentage, Toolkit::Alignment::HorizontalCenter, DemoHelper::DEFAULT_PLAY_PADDING );
// Setup
- mView.SetPosition(Vector3(0.0f, 0.0f, 0.0f));
+ mView.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 0.0f ) );
mContents.SetBehavior(Layer::LAYER_3D);
- mContents.SetPosition(mTranslation);
+ mContents.SetProperty( Actor::Property::POSITION, mTranslation );
mContents.SetProperty( Actor::Property::ORIENTATION, CalculateWorldRotation( mSceneXRotation, mSceneYRotation ) );
- mContents.SetScale(mPinchScale, mPinchScale, mPinchScale);
+ mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) );
mPanGestureDetector = PanGestureDetector::New();
mPanGestureDetector.Attach( mView );
mShadowPlaneBg.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
mShadowPlaneBg.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
mShadowPlaneBg.SetProperty( Dali::Actor::Property::NAME,"Plane");
- mShadowPlaneBg.SetSize(1000.0f, 1000.0f);
+ mShadowPlaneBg.SetProperty( Actor::Property::SIZE, Vector2(1000.0f, 1000.0f) );
mContents.Add(mShadowPlaneBg);
- mShadowPlaneBg.SetPosition(Vector3(50.0f, 50.0f, -200.0f));
+ mShadowPlaneBg.SetProperty( Actor::Property::POSITION, Vector3(50.0f, 50.0f, -200.0f));
mShadowView.SetShadowPlaneBackground(mShadowPlaneBg);
mShadowView.Activate();
mCastingLight = Actor::New();
mCastingLight.SetProperty( Actor::Property::PARENT_ORIGIN,ParentOrigin::CENTER);
mCastingLight.SetProperty( Actor::Property::ANCHOR_POINT,AnchorPoint::CENTER);
- mCastingLight.SetPosition( Vector3( 0.0f, 0.0f, 800.0f ) * scaleFactor );
+ mCastingLight.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 800.0f ) * scaleFactor );
TextLabel text = TextLabel::New( "Light" );
text.SetProperty( TextLabel::Property::POINT_SIZE, 20.0f );
mSceneAnimation.SetLooping(true);
mSceneAnimation.Play();
- mSceneActor.SetSize(250.0f, 250.0f);
- mSceneActor.SetPosition(0.0f, 0.0f, 130.0f);
+ mSceneActor.SetProperty( Actor::Property::SIZE, Vector2( 250.0f, 250.0f ) );
+ mSceneActor.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 0.0f, 130.0f ) );
mShadowView.Add(mSceneActor);
}
case PAN_SCENE:
{
mTranslation += Vector3(gesture.displacement.x, gesture.displacement.y, 0.f);
- mContents.SetPosition(mTranslation);
+ mContents.SetProperty( Actor::Property::POSITION, mTranslation );
break;
}
}
mPinchScale = Clamp(mScaleAtPinchStart * gesture.scale, MIN_PINCH_SCALE, MAX_PINCH_SCALE);
- mContents.SetScale(mPinchScale, mPinchScale, mPinchScale);
+ mContents.SetProperty( Actor::Property::SCALE, Vector3( mPinchScale, mPinchScale, mPinchScale ) );
}
void Terminate(Application& app)
{
// Reset translation
mTranslation = Vector3::ZERO;
- mContents.SetPosition(mTranslation);
+ mContents.SetProperty( Actor::Property::POSITION, mTranslation );
// Align scene so that light anchor orientation is Z Axis
mSceneXRotation = -mLightXRotation;
TextLabel label01 = TextLabel::New();
label01.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
label01.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- label01.SetSize( 400.f, 50.f );
- label01.SetPosition( 0.f, -100.f );
+ label01.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) );
+ label01.SetProperty( Actor::Property::POSITION, Vector2( 0.f, -100.f ));
label01.SetProperty( TextLabel::Property::MULTI_LINE, true );
label01.SetProperty( TextLabel::Property::ENABLE_MARKUP, true );
TextLabel label02 = TextLabel::New();
label02.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
label02.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- label02.SetSize( 400.f, 50.f );
- label02.SetPosition( 0.f, -50.f );
+ label02.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) );
+ label02.SetProperty( Actor::Property::POSITION, Vector2( 0.f, -50.f ));
label02.SetProperty( TextLabel::Property::MULTI_LINE, true );
label02.SetProperty( TextLabel::Property::TEXT, "0123456789:" );
TextLabel label03 = TextLabel::New();
label03.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
label03.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- label03.SetSize( 400.f, 50.f );
- label03.SetPosition( 0.f, 0.f );
+ label03.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) );
+ label03.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f ));
label03.SetProperty( TextLabel::Property::MULTI_LINE, true );
label03.SetProperty( TextLabel::Property::TEXT, "0123456789:" );
TextLabel label04 = TextLabel::New();
label04.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
label04.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- label04.SetSize( 400.f, 50.f );
- label04.SetPosition( 0.f, 50.f );
+ label04.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 50.f ) );
+ label04.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 50.f ));
label04.SetProperty( TextLabel::Property::MULTI_LINE, true );
label04.SetProperty( TextLabel::Property::TEXT, "0123456789:" );
ScrollView scrollView = ScrollView::New();
scrollView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
scrollView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- scrollView.SetSize( pageSize );
+ scrollView.SetProperty( Actor::Property::SIZE, pageSize );
scrollView.SetAxisAutoLock( true );
stage.Add( scrollView );
for( int column = 0, textNumber = 0; column < NUMBER_OF_PAGES; column++ )
{
Actor page = CreatePage( pageSize, textNumber );
- page.SetPosition( column * pageSize.x, 0.0f );
+ page.SetProperty( Actor::Property::POSITION, Vector2( column * pageSize.x, 0.0f ));
scrollView.Add( page );
}
TextField field = TextField::New();
field.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- field.SetSize( 300.f, 60.f );
+ field.SetProperty( Actor::Property::SIZE, Vector2( 300.f, 60.f ) );
field.SetBackgroundColor( Color::WHITE );
field.SetBackgroundColor( Vector4( 1.f, 1.f, 1.f, 0.15f ) );
mLabel.SetProperty( Dali::Actor::Property::NAME, "SimpleTextLabel" );
mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mLabel.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- mLabel.SetSize( 400.f, 400.f );
+ mLabel.SetProperty( Actor::Property::SIZE, Vector2( 400.f, 400.f ) );
mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK );
mLabel.SetBackgroundColor( Color::WHITE );
Actor actor = Actor::New();
actor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
actor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- actor.SetPosition( 0.f, 0.f);
- actor.SetSize( 360.f, 360.f );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 0.f, 0.f));
+ actor.SetProperty( Actor::Property::SIZE, Vector2( 360.f, 360.f ) );
actor.SetProperty( Actor::Property::COLOR, Color::WHITE );
actor.AddRenderer( renderer );
popup.SetProperty( Dali::Actor::Property::NAME, "popup" );
popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- popup.SetSize( POPUP_WIDTH_DP, 0.0f );
+ popup.SetProperty( Actor::Property::SIZE, Vector2( POPUP_WIDTH_DP, 0.0f ) );
popup.SetProperty( Toolkit::Popup::Property::TAIL_VISIBILITY, false );
popup.OutsideTouchedSignal().Connect( this, &SizeNegotiationController::OnPopupOutsideTouched );
{
Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- backing.SetSize( 0.0f, 100.0f );
+ backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
{
Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- backing.SetSize( 0.0f, 100.0f );
+ backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
{
Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- backing.SetSize( 0.0f, 200.0f );
+ backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
{
Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- backing.SetSize( 0.0f, 100.0f );
+ backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
{
Actor backing = CreateSolidColor( Vector4( 1.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- backing.SetSize( 0.0f, 200.0f );
+ backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
{
Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- backing.SetSize( 0.0f, 300.0f );
+ backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 300.0f ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
Actor backing = CreateSolidColor( Vector4( 1.0f, 0.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
backing.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
- backing.SetSize( 0.0f, 100.0f );
+ backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 100.0f ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
{
Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- backing.SetSize( 0.0f, 200.0f );
+ backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
{
Actor backing = CreateSolidColor( Vector4( 0.0f, 1.0f, 0.0f, 1.0f ) );
backing.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
- backing.SetSize( 0.0f, 200.0f );
+ backing.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 200.0f ) );
Toolkit::TextLabel text = Toolkit::TextLabel::New( "Fit" );
text.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::WHITE );
stage.Add( mMeshActor );
- mMeshActor.SetPosition( ACTOR_POSITION );
- mMeshActor.SetScale( ACTOR_SCALE );
+ mMeshActor.SetProperty( Actor::Property::POSITION, ACTOR_POSITION );
+ mMeshActor.SetProperty( Actor::Property::SCALE, ACTOR_SCALE );
mTapDetector = TapGestureDetector::New();
mTapDetector.Attach(mCircleBackground);
Actor meshActor = Actor::New();
meshActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
- meshActor.SetSize( 1, 1 );
+ meshActor.SetProperty( Actor::Property::SIZE, Vector2( 1, 1 ) );
meshActor.AddRenderer( renderer );
return meshActor;
// prepare the animation by setting the uniform to the required value
mEffect.SetProperty( mEffect.GetPropertyIndex( BREAK_UNIFORM_NAME ), 1.f );
- mMeshActor.SetScale(0.01f);
+ mMeshActor.SetProperty( Actor::Property::SCALE,0.01f);
mEffect.SetProperty( mEffect.GetPropertyIndex( "uScale" ), 0.01f );
- mMeshActor.SetPosition( 0.f, 0.f, 1.f );
+ mMeshActor.SetProperty( Actor::Property::POSITION, Vector3( 0.f, 0.f, 1.f ) );
Animation breakAnimation = Animation::New(duration*1.5f);
breakAnimation.AnimateTo( Property(mMeshActor, Actor::Property::SCALE), Vector3(ACTOR_SCALE,ACTOR_SCALE,ACTOR_SCALE), EaseOutSquare);
mContentPane = CreateContentPane();
stage.Add( mContentPane );
- mContentPane.SetSize( stage.GetSize() );
+ mContentPane.SetProperty( Actor::Property::SIZE, stage.GetSize() );
// Content panes:
TableView contentLayout = TableView::New( 5, 1 );
std::ostringstream thumbnailName; thumbnailName << "thumbnail" << i+1;
ImageView image = ImageView::New( images[i] );
image.SetProperty( Dali::Actor::Property::NAME, thumbnailName.str() );
- image.SetSize( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) );
+ image.SetProperty( Actor::Property::SIZE, Vector2( DP(RADIO_LABEL_THUMBNAIL_SIZE), DP(RADIO_LABEL_THUMBNAIL_SIZE) ) );
std::ostringstream label; label << (i+1);
std::ostringstream radioButtonStyleName;
grabHandle.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
grabHandle.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_RIGHT );
grabHandle.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_RIGHT );
- grabHandle.SetPosition( -BORDER_WIDTH, -BORDER_WIDTH );
+ grabHandle.SetProperty( Actor::Property::POSITION, Vector2( -BORDER_WIDTH, -BORDER_WIDTH ));
grabHandle.SetProperty( DevelActor::Property::OPACITY, 0.6f );
Layer grabCornerLayer = Layer::New();
popup.SetStyleName("ResetPopup");
popup.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
popup.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- popup.SetSize( stage.GetSize().width * 0.75f, 0.0f );
+ popup.SetProperty( Actor::Property::SIZE, Vector2( stage.GetSize().width * 0.75f, 0.0f ) );
popup.SetProperty( Popup::Property::TAIL_VISIBILITY, false );
popup.OutsideTouchedSignal().Connect( this, &StylingApplication::HidePopup );
popup.HiddenSignal().Connect( this, &StylingApplication::PopupHidden );
footer.SetStyleName( "PopupFooter" );
footer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
footer.SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
- footer.SetSize( 0.0f, 80.0f );
+ footer.SetProperty( Actor::Property::SIZE, Vector2( 0.0f, 80.0f ) );
footer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
footer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
void StylingApplication::OnPan( Actor actor, const PanGesture& gesture )
{
Vector3 size = mContentPane.GetTargetSize();
- mContentPane.SetSize( size.GetVectorXY() + gesture.displacement * 2.0f );
+ mContentPane.SetProperty( Actor::Property::SIZE, Vector2( size.GetVectorXY() + gesture.displacement * 2.0f ) );
}
void StylingApplication::OnKeyEvent( const KeyEvent& keyEvent )
mSuperBlurView = SuperBlurView::New( DEFAULT_BLUR_LEVEL );
mSuperBlurView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mSuperBlurView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
- mSuperBlurView.SetSize( 800, 1280 );
+ mSuperBlurView.SetProperty( Actor::Property::SIZE, Vector2( 800, 1280 ) );
mSuperBlurView.SetProperty( SuperBlurView::Property::IMAGE_URL, BACKGROUND_IMAGE );
stage.Add( mSuperBlurView );
mEditor = TextEditor::New();
mEditor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
mEditor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
- mEditor.SetPosition( 0.f, toolBarHeight * 2.0f, 0.f );
+ mEditor.SetProperty( Actor::Property::POSITION, Vector3( 0.f, toolBarHeight * 2.0f, 0.f ));
mEditor.SetResizePolicy( ResizePolicy::SIZE_RELATIVE_TO_PARENT, Dimension::ALL_DIMENSIONS );
mEditor.SetProperty( Actor::Property::SIZE_MODE_FACTOR, TEXT_EDITOR_RELATIVE_SIZE );
// Place below color selection button.
mButtonContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
mButtonContainer.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_CENTER );
- mButtonContainer.SetPosition( 0.0f, 2.f * TOOLBAR_PADDING, 0.f );
+ mButtonContainer.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, 2.f * TOOLBAR_PADDING, 0.f ));
mColorContainer.Add( mButtonContainer );
const Vector3 buttonPercentage( 1.f, 0.8f / static_cast<float>( NUMBER_OF_COLORS ), 1.f );
void CreateContainer( Control& container, const Vector2 size )
{
container = Control::New();
- container.SetSize( size );
+ container.SetProperty( Actor::Property::SIZE, size );
container.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
container.SetProperty( Actor::Property::DRAW_MODE, DrawMode::OVERLAY_2D );
}
button = PushButton::New();
button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- button.SetSize( 50.0f, 50.0f );
+ button.SetProperty( Actor::Property::SIZE, Vector2( 50.0f, 50.0f ) );
}
bool OnButtonClicked( Toolkit::Button button )
CreateContainer ( mContainer4 , mLayoutSize);
Stage stage = Stage::GetCurrent();
Vector2 stageSize = stage.GetSize();
- mContainer4.SetPosition( 0, stageSize.height*0.25f*3 );
+ mContainer4.SetProperty( Actor::Property::POSITION, Vector2( 0, stageSize.height*0.25f*3 ));
stage.Add( mContainer4 );
// Info
CreateContainer ( mContainer4Info , mLayoutSize );
CreateTextLabel ( mLabel3, LABEL_TEXT, Color::WHITE );
mLabel3.SetProperty( TextLabel::Property::FONT_FAMILY, "SamsungOneUI" );
- mContainer.SetPosition( 0, 0 );
- mContainer2.SetPosition( 0, stageSize.height*0.25f );
- mContainer3.SetPosition( 0, stageSize.height*0.25f*2 );
+ mContainer.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
+ mContainer2.SetProperty( Actor::Property::POSITION, Vector2( 0, stageSize.height*0.25f ));
+ mContainer3.SetProperty( Actor::Property::POSITION, Vector2( 0, stageSize.height*0.25f*2 ));
mContainer.Add( mLabel );
mContainer2.Add( mLabel2 );
void ExpandingButtons::OnRelayout( const Dali::Vector2& targetSize, Dali::RelayoutContainer& container )
{
mButtonSize = targetSize;
- mExpandButton.SetSize( targetSize );
+ mExpandButton.SetProperty( Actor::Property::SIZE, targetSize );
}
void ExpandingButtons::RegisterButton( Dali::Toolkit::Control& control )
void SetUpExpandingStyleButtons( Vector2 position )
{
mExpandingButtons = Demo::ExpandingButtons::New();
- mExpandingButtons.SetPosition( mButtonSize.width, mStageSize.height * STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE );
+ mExpandingButtons.SetProperty( Actor::Property::POSITION, Vector2( mButtonSize.width, mStageSize.height * STYLE_BUTTON_POSTION_RELATIVE_TO_STAGE ));
mExpandingButtons.CollapsingSignal().Connect( this, &TextLabelExample::OnExpandingButtonCollapsing );
- mExpandingButtons.SetSize( mButtonSize );
+ mExpandingButtons.SetProperty( Actor::Property::SIZE, mButtonSize );
// Creates the buttons to be expanded
CreateStyleButtons();
mContainer.SetProperty( Dali::Actor::Property::NAME, "Container" );
mContainer.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mLayoutSize = Vector2(mStageSize.width*0.6f, mStageSize.width*0.6f);
- mContainer.SetSize( mLayoutSize );
+ mContainer.SetProperty( Actor::Property::SIZE, mLayoutSize );
stage.Add( mContainer );
// Resize the center layout when the corner is grabbed
mLabel.SetProperty( Dali::Actor::Property::NAME, "TextLabel" );
mLabel.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mLabel.SetSize(mLayoutSize);
+ mLabel.SetProperty( Actor::Property::SIZE, mLayoutSize );
mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
mLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::GREEN );
mLabel.SetBackgroundColor( Color::WHITE );
if ( ! mColorButtons[index] )
{
mColorButtons[index] = RadioButton::New();
- mColorButtons[index].SetSize( mButtonSize );
+ mColorButtons[index].SetProperty( Actor::Property::SIZE, mButtonSize );
mColorButtons[index].ClickedSignal().Connect( this, &TextLabelExample::OnColorSelected );
mColorButtons[index].SetProperty( Button::Property::TOGGLABLE, true );
Property::Map propertyMap;
mColorButtons[index].Lower();
// Position button using nice animation
- mColorButtons[index].SetY( -GAP_BETWEEN_BUTTONS );
+ mColorButtons[index].SetProperty( Actor::Property::POSITION_Y, -GAP_BETWEEN_BUTTONS );
float desiredPosition = -( mButtonSize.height + GAP_BETWEEN_BUTTONS ) * (index);
AlphaFunction focusedAlphaFunction = AlphaFunction( Vector2 ( 0.32f, 0.08f ), Vector2( 0.38f, 1.72f ) );
mColorButtonsAnimation.AnimateBy( Property( mColorButtons[index], Actor::Property::POSITION_Y ), desiredPosition, focusedAlphaFunction );
mStyleButtons[index].SetProperty( Toolkit::Button::Property::UNSELECTED_BACKGROUND_VISUAL, BUTTON_IMAGES[ index ] );
mStyleButtons[index].SetProperty( Toolkit::Button::Property::SELECTED_BACKGROUND_VISUAL, STYLE_SELECTED_IMAGE );
mStyleButtons[index].SetProperty( Dali::Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
- mStyleButtons[index].SetSize( mButtonSize );
+ mStyleButtons[index].SetProperty( Actor::Property::SIZE, mButtonSize );
mStyleButtons[index].ClickedSignal().Connect( this, &TextLabelExample::OnStyleButtonClicked );
}
}
Vector2 clampedSize = Vector2( std::max( ConvertToEven( static_cast<int>( mLayoutSize.x )), 2 ),
std::max( ConvertToEven( static_cast<int>( mLayoutSize.y )), 2 ) );
- mContainer.SetSize( clampedSize );
+ mContainer.SetProperty( Actor::Property::SIZE, clampedSize );
}
if( gesture.state == Gesture::Cancelled || gesture.state == Gesture::Finished )
{
// Resize the text label to match the container size when panning is finished
- mLabel.SetSize(mLayoutSize);
+ mLabel.SetProperty( Actor::Property::SIZE, mLayoutSize );
mBorder.SetProperty( Actor::Property::VISIBLE,false);
}
}
label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true );
Vector2 stageSize = Stage::GetCurrent().GetSize();
- label.SetPosition( Vector3( Random::Range( 0.0f, stageSize.x ), Random::Range( 0.0f, stageSize.y ), 0.0f) );
+ label.SetProperty( Actor::Property::POSITION, Vector3( Random::Range( 0.0f, stageSize.x ), Random::Range( 0.0f, stageSize.y ), 0.0f) );
switch ( type )
{
shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
- label.SetSize(stageSize.x, stageSize.y * 0.25f); // Set the text label in larger size
+ label.SetProperty( Actor::Property::SIZE, Vector2(stageSize.x, stageSize.y * 0.25f) ); // Set the text label in larger size
break;
}
default:
mLabels[i].SetProperty( TextLabel::Property::HORIZONTAL_ALIGNMENT, "CENTER" );
mLabels[i].SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mLabels[i].SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT );
- mLabels[i].SetPosition( 0, (i*2+1) * stageSize.height * 0.25f );
+ mLabels[i].SetProperty( Actor::Property::POSITION, Vector2( 0, (i*2+1) * stageSize.height * 0.25f ));
}
stage.Add( mLabels[0] );
Vector2 stageSize = Stage::GetCurrent().GetSize();
Vector3 size = mGrabbedActor.GetCurrentProperty< Vector3 >( Actor::Property::SIZE );
float y = Clamp( gesture.position.y, size.y * 0.5f, stageSize.y - size.y*0.5f );
- mGrabbedActor.SetPosition( 0, y );
+ mGrabbedActor.SetProperty( Actor::Property::POSITION, Vector2( 0, y ));
}
else
{
box.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
box.SetResizePolicy( ResizePolicy::FIT_TO_CHILDREN, Dimension::HEIGHT );
box.SetResizePolicy( ResizePolicy::FIXED, Dimension::WIDTH );
- box.SetSize( size.width, 0.f );
+ box.SetProperty( Actor::Property::SIZE, Vector2( size.width, 0.f ) );
parent.Add( box );
Dali::Property::Map border;
}
button.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- button.SetSize(BOX_SIZE.height,BOX_SIZE.height);
+ button.SetProperty( Actor::Property::SIZE, Vector2(BOX_SIZE.height,BOX_SIZE.height) );
button.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_RIGHT );
button.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
parent.Add(button);
Actor rootActor = Actor::New();
rootActor.SetProperty( Dali::Actor::Property::NAME,"rootActor");
rootActor.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- rootActor.SetSize( mStageSize );
+ rootActor.SetProperty( Actor::Property::SIZE, mStageSize );
rootActor.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
stage.Add( rootActor );
desktop.SetProperty( Dali::Actor::Property::NAME,"desktopActor");
desktop.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
desktop.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- desktop.SetSize( mTargetActorSize );
+ desktop.SetProperty( Actor::Property::SIZE, mTargetActorSize );
rootActor.Add( desktop ); // Add desktop (content) to offscreen actor
Control boxE = Control::New();
CreateBox( "boxA", boxA, desktop, BOX_SIZE );
- boxA.SetPosition( 0.0f, -500.0f, 1.0f );
+ boxA.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -500.0f, 1.0f ));
// Create TextField
TextField field = TextField::New();
field.SetProperty( TextField::Property::PLACEHOLDER_TEXT, "Enter Folder Name" );
field.SetProperty( TextField::Property::DECORATION_BOUNDING_BOX, Rect<int>( SCREEN_BORDER, SCREEN_BORDER, mStageSize.width - SCREEN_BORDER*2, mStageSize.height - SCREEN_BORDER*2 ) );
boxA.Add( field );
- boxA.SetSize(BOX_SIZE);
+ boxA.SetProperty( Actor::Property::SIZE, BOX_SIZE);
CreateBox( "boxB", boxB, desktop, SCROLLING_BOX_SIZE );
- boxB.SetPosition( 0.0f, -400.0f, 1.0f );
+ boxB.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -400.0f, 1.0f ));
Toolkit::PushButton scrollLargeButton = Toolkit::PushButton::New();
scrollLargeButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedLarge );
CreateLabel( mLargeLabel, "A Quick Brown Fox Jumps Over The Lazy Dog", boxB, false ,scrollLargeButton );
CreateBox( "boxC", boxC, desktop, SCROLLING_BOX_SIZE );
- boxC.SetPosition( 0.0f, -300.0f, 1.0f );
+ boxC.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -300.0f, 1.0f ));
Toolkit::PushButton scrollSmallButton = Toolkit::PushButton::New();
scrollSmallButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedSmall );
CreateLabel( mSmallLabel, "Hello Text", boxC , true, scrollSmallButton );
mSmallLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
CreateBox( "boxD", boxD, desktop, SCROLLING_BOX_SIZE );
- boxD.SetPosition( 0.0f, -200.0f, 1.0f );
+ boxD.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -200.0f, 1.0f ));
Toolkit::PushButton scrollRtlButton = Toolkit::PushButton::New();
scrollRtlButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtl );
CreateLabel( mRtlLabel, "مرحبا بالعالم", boxD , true, scrollRtlButton );
mRtlLabel.SetProperty(TextLabel::Property::AUTO_SCROLL_LOOP_DELAY, 0.3f );
CreateBox( "boxE", boxE, desktop, SCROLLING_BOX_SIZE );
- boxE.SetPosition( 0.0f, -100.0f, 1.0f );
+ boxE.SetProperty( Actor::Property::POSITION, Vector3( 0.0f, -100.0f, 1.0f ));
Toolkit::PushButton scrollRtlLongButton = Toolkit::PushButton::New();
scrollRtlLongButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedRtlLong );
CreateLabel( mRtlLongLabel, " مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم مرحبا بالعالم", boxE , false, scrollRtlLongButton );
colorButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_CENTER );
colorButton.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_CENTER );
colorButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- colorButton.SetSize(BOX_SIZE.height,BOX_SIZE.height);
+ colorButton.SetProperty( Actor::Property::SIZE, Vector2(BOX_SIZE.height,BOX_SIZE.height) );
colorButton.ClickedSignal().Connect( this, &TextScrollingExample::OnColorButtonClicked );
rootActor.Add( colorButton );
mTargetActorPosition.y = mTargetActorPosition.y + position.y;
mTargetActorPosition.y = std::min( mTargetActorPosition.y, -mTargetActorSize.height );
mTargetActorPosition.y = std::max( mTargetActorPosition.y, ( mTargetActorSize.height - mStageSize.height*0.25f ) );
- actor.SetPosition( 0.0f, mTargetActorPosition.y );
+ actor.SetProperty( Actor::Property::POSITION, Vector2( 0.0f, mTargetActorPosition.y ));
}
}
mMeshActor = Actor::New();
mMeshActor.AddRenderer( mRenderer );
- mMeshActor.SetSize(400, 400);
+ mMeshActor.SetProperty( Actor::Property::SIZE, Vector2(400, 400) );
Property::Index fadeColorIndex = mRenderer.RegisterProperty( "uFadeColor", Color::MAGENTA );
mRenderer.SetProperty( Renderer::Property::DEPTH_INDEX, 0 );
mMeshActor2 = Actor::New();
mMeshActor2.AddRenderer( mRenderer2 );
- mMeshActor2.SetSize(400, 400);
+ mMeshActor2.SetProperty( Actor::Property::SIZE, Vector2(400, 400) );
mMeshActor2.RegisterProperty( "anotherProperty", Color::GREEN );
control.SetProperty( Actor::Property::SIZE_MODE_FACTOR, Vector3( 0.75, 0.1, 1.0 ) );
control.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
control.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_CENTER );
- control.SetY( stageSize.height * previousPosition );
+ control.SetProperty( Actor::Property::POSITION_Y, stageSize.height * previousPosition );
}
}
mVideoView.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
mVideoView.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::CENTER );
mVideoView.SetResizePolicy( ResizePolicy::USE_NATURAL_SIZE, Dimension::ALL_DIMENSIONS );
- mVideoView.SetSize( INIT_WIDTH, INIT_HEIGHT );
+ mVideoView.SetProperty( Actor::Property::SIZE, Vector2( INIT_WIDTH, INIT_HEIGHT ) );
mVideoView.SetProperty( VideoView::Property::LOOPING, true );
mVideoView.SetProperty( VideoView::Property::MUTED, false );
mVideoView.SetProperty( VideoView::Property::VIDEO, PLAY_FILE );
mMenu.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::BOTTOM_LEFT );
mMenu.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::BOTTOM_LEFT );
mMenu.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- mMenu.SetSize( INIT_WIDTH, 120 );
+ mMenu.SetProperty( Actor::Property::SIZE, Vector2( INIT_WIDTH, 120 ) );
mVideoView.Add( mMenu );
mPlayButton = PushButton::New();
mPlayButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mPlayButton.SetProperty( Dali::Actor::Property::NAME, "Play" );
mPlayButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- mPlayButton.SetSize( BUTTON_SIZE, BUTTON_SIZE );
- mPlayButton.SetPosition( 40, 10 );
+ mPlayButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) );
+ mPlayButton.SetProperty( Actor::Property::POSITION, Vector2( 40, 10 ));
mPlayButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked );
mPauseButton = PushButton::New();
mPauseButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mPauseButton.SetProperty( Dali::Actor::Property::NAME, "Pause" );
mPauseButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- mPauseButton.SetSize( BUTTON_SIZE, BUTTON_SIZE );
- mPauseButton.SetPosition( 40, 10 );
+ mPauseButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) );
+ mPauseButton.SetProperty( Actor::Property::POSITION, Vector2( 40, 10 ));
mPauseButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked );
mChangeButton = PushButton::New();
mChangeButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mChangeButton.SetProperty( Dali::Actor::Property::NAME, "Change" );
mChangeButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- mChangeButton.SetSize( BUTTON_SIZE, BUTTON_SIZE );
- mChangeButton.SetPosition( 140, 10 );
+ mChangeButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) );
+ mChangeButton.SetProperty( Actor::Property::POSITION, Vector2( 140, 10 ));
mChangeButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked );
mBackwardButton = PushButton::New();
mBackwardButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mBackwardButton.SetProperty( Dali::Actor::Property::NAME, "Backward" );
mBackwardButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- mBackwardButton.SetSize( BUTTON_SIZE, BUTTON_SIZE );
- mBackwardButton.SetPosition( 240, 10 );
+ mBackwardButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) );
+ mBackwardButton.SetProperty( Actor::Property::POSITION, Vector2( 240, 10 ));
mBackwardButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked );
mForwardButton = PushButton::New();
mForwardButton.SetProperty( Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT );
mForwardButton.SetProperty( Dali::Actor::Property::NAME, "Forward" );
mForwardButton.SetResizePolicy( ResizePolicy::FIXED, Dimension::ALL_DIMENSIONS );
- mForwardButton.SetSize( BUTTON_SIZE, BUTTON_SIZE );
- mForwardButton.SetPosition( 340, 10 );
+ mForwardButton.SetProperty( Actor::Property::SIZE, Vector2( BUTTON_SIZE, BUTTON_SIZE ) );
+ mForwardButton.SetProperty( Actor::Property::POSITION, Vector2( 340, 10 ));
mForwardButton.ClickedSignal().Connect( this, &VideoViewController::OnButtonClicked );
mMenu.Add( mPlayButton );
if( gesture.state == Gesture::Finished )
{
mScale = mPinchStartScale * gesture.scale;
- mVideoView.SetScale( mScale );
+ mVideoView.SetProperty( Actor::Property::SCALE, mScale );
}
}
{
if( !mIsFullScreen )
{
- mVideoView.SetSize( mStageSize.x, mStageSize.y );
+ mVideoView.SetProperty( Actor::Property::SIZE, mStageSize );
mIsFullScreen = true;
}
else
{
- mVideoView.SetSize( INIT_WIDTH, INIT_HEIGHT );
+ mVideoView.SetProperty( Actor::Property::SIZE, Vector2( INIT_WIDTH, INIT_HEIGHT ) );
mIsFullScreen = false;
}
}
mVisualButtons[i].SetProperty( BeatControl::Property::BEAT_VISUAL, map );
mVisualButtons[i].SetProperty( Dali::Actor::Property::NAME,"VisualButton");
mVisualButtons[i].SetStyleName("VisualButton");
- mVisualButtons[i].SetSize(0, 50);
+ mVisualButtons[i].SetProperty( Actor::Property::SIZE, Vector2(0, 50) );
mVisualButtons[i].SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::WIDTH );
mVisualButtons[i].SetResizePolicy( ResizePolicy::FIXED, Dimension::HEIGHT );
mVisualIndex = mVisualButtons[i].RegisterProperty( "visualId", i, Property::READ_WRITE );
mWebView = Toolkit::WebView::New( "ko-KR", "Asia/Seoul" );
mWebView.SetProperty( Actor::Property::PARENT_ORIGIN, Dali::ParentOrigin::CENTER );
mWebView.SetProperty( Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::CENTER );
- mWebView.SetPosition( 0, 0 );
- mWebView.SetSize( width, height );
+ mWebView.SetProperty( Actor::Property::POSITION, Vector2( 0, 0 ));
+ mWebView.SetProperty( Actor::Property::SIZE, Vector2( width, height ) );
mWebView.PageLoadStartedSignal().Connect( this, &WebViewController::OnPageLoadStarted );
mWebView.PageLoadFinishedSignal().Connect( this, &WebViewController::OnPageLoadFinished );
Random::Range( -size.y, size.y ),
Random::Range( BUBBLE_MIN_Z, BUBBLE_MAX_Z ) );
- child.SetPosition( childPos );
+ child.SetProperty( Actor::Property::POSITION, childPos );
// Define bubble horizontal parallax and vertical wrapping
Constraint animConstraint = Constraint::New < Vector3 > ( child, Actor::Property::POSITION, AnimateBubbleConstraint( childPos, Random::Range( -0.85f, 0.25f ) ) );
int shapeType = static_cast<int>( Random::Range( 0.0f, NUMBER_OF_SHAPE_IMAGES - 1 ) + 0.5f );
ImageView dfActor = ImageView::New();
- dfActor.SetSize( Vector2( randSize, randSize ) );
+ dfActor.SetProperty( Actor::Property::SIZE, Vector2( randSize, randSize ) );
dfActor.SetProperty( Actor::Property::PARENT_ORIGIN, ParentOrigin::CENTER );
// Set the Image URL and the custom shader at the same time
toolBarLayer.SetProperty( Dali::Actor::Property::ANCHOR_POINT, Dali::AnchorPoint::TOP_CENTER );
toolBarLayer.SetProperty( Dali::Actor::Property::PARENT_ORIGIN, Dali::ParentOrigin::TOP_CENTER );
toolBarLayer.SetResizePolicy( Dali::ResizePolicy::FILL_TO_PARENT, Dali::Dimension::WIDTH );
- toolBarLayer.SetSize( 0.0f, style.mToolBarHeight );
+ toolBarLayer.SetProperty( Dali::Actor::Property::SIZE, Dali::Vector2( 0.0f, style.mToolBarHeight ) );
// Raise tool bar layer to the top.
toolBarLayer.RaiseToTop();