Fix listbox position on UIDropDownList.

--HG--
branch : dev
This commit is contained in:
Martí­n Lucas Golini
2017-08-12 16:52:35 -03:00
parent 4bdcf10311
commit 602bfd183e

View File

@@ -148,6 +148,15 @@ void UIDropDownList::showList() {
if ( mStyleConfig.PopUpToMainControl ) {
getParent()->controlToWorld( Pos );
Pos = PixelDensity::pxToDpI( Pos );
} else if ( NULL != mFriendCtrl ) {
Pos = Vector2i( mFriendCtrl->getPosition().x, mFriendCtrl->getPosition().y + mFriendCtrl->getSize().getHeight() );
} else {
UIControl * ParentLoop = getParent();
UIControl * rp = getWindowContainer();
while ( rp != ParentLoop ) {
Pos += ParentLoop->getPosition();
ParentLoop = ParentLoop->getParent();
}
}
Pos.y -= mListBox->getSize().getHeight();