default: // use center as default
{
if( currentSize.width + padding.left + padding.right >= parentSize.width )
default: // use center as default
{
if( currentSize.width + padding.left + padding.right >= parentSize.width )
default: // use center as default
{
if( currentSize.height + padding.top + padding.bottom >= parentSize.height )
default: // use center as default
{
if( currentSize.height + padding.top + padding.bottom >= parentSize.height )
- // anchorPoint.x is initialized to 0.0, which is HorizontalLeft
- if( Toolkit::Alignment::HorizontalCenter == mHorizontal )
+ // anchorPoint.x is initialized to 0.0, which is HORIZONTAL_LEFT
+ if( Toolkit::Alignment::HORIZONTAL_CENTER == mHorizontal )
- // anchorPoint.y is initialized to 0.0, which is VerticalTop
- if( Toolkit::Alignment::VerticalCenter == mVertical )
+ // anchorPoint.y is initialized to 0.0, which is VERTICAL_TOP
+ if( Toolkit::Alignment::VERTICAL_CENTER == mVertical )
{
newChildSize = Vector2( std::min( newChildSize.width, currentChildSize.width ), std::min( newChildSize.height, currentChildSize.height ) );
break;
}
{
newChildSize = Vector2( std::min( newChildSize.width, currentChildSize.width ), std::min( newChildSize.height, currentChildSize.height ) );
break;
}
{
// check source size vs target size to see if we need to shrink
float widthScale = ( newChildSize.width < currentChildSize.width ) ? (newChildSize.width / currentChildSize.width) : 1.f;
{
// check source size vs target size to see if we need to shrink
float widthScale = ( newChildSize.width < currentChildSize.width ) ? (newChildSize.width / currentChildSize.width) : 1.f;
: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
mHorizontal( horizontal ),
mVertical( vertical ),
: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ),
mHorizontal( horizontal ),
mVertical( vertical ),
mPadding( 0.f, 0.f, 0.f, 0.f )
{
}
mPadding( 0.f, 0.f, 0.f, 0.f )
{
}