void GuiRolloutCtrl::calculateHeights() { S32 barHeight = 20; if ( mHasTexture && mProfile && mProfile->mBitmapArrayRects.size() >= NumBitmaps ) { // Store Header Rectangle mHeader.set( 0, 0, getWidth(), mProfile->mBitmapArrayRects[ CollapsedCenter ].extent.y ); // Bottom Bar Max barHeight = mProfile->mBitmapArrayRects[ TopLeftHeader ].extent.y; } else { mHeader.set( 0, 0, getWidth(), barHeight ); } if ( mHideHeader ) { barHeight = 0; mHeader.extent.y = 0; } GuiControl *content = static_cast<GuiControl*>( at(0) ); if ( content != NULL ) mExpanded.set( 0, 0, getWidth(), barHeight + content->getHeight() + ( mMargin.point.y + mMargin.extent.y ) ); else mExpanded.set( 0, 0, getWidth(), barHeight + mDefaultHeight ); }