stage.Add( mContainer );
TextField field = TextField::New();
- field.SetParentOrigin( ParentOrigin::CENTER );
- field.SetResizePolicy( FIXED, ALL_DIMENSIONS );
- field.SetPreferredSize( Vector2(stageSize.width*0.6f, stageSize.width*0.6f) );
+ field.SetAnchorPoint( AnchorPoint::TOP_LEFT );
+ field.SetDimensionDependency( HEIGHT, WIDTH );
+ field.SetResizePolicy( FILL_TO_PARENT, WIDTH );
mContainer.Add( field );
mLabel = TextLabel::New( "A Quick Brown Fox Jumps Over The Lazy Dog" );
mLabel.SetName( "TextLabel" );
mLabel.SetAnchorPoint( AnchorPoint::TOP_LEFT );
- mLabel.SetResizePolicy( FILL_TO_PARENT, HEIGHT );
+ mLabel.SetDimensionDependency( HEIGHT, WIDTH );
+ mLabel.SetResizePolicy( FILL_TO_PARENT, WIDTH );
mLabel.SetProperty( TextLabel::Property::MULTI_LINE, true );
mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 1.0f, 1.0f ) );
mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK );