There is a bit of code in UIPopupList.Show() that causes the position of the popup's generated "Drop-down" object to be based on the panel's parent even though the "Drop-down" object is still a child of the panel. This causes a problem if the panel's local position is not (0,0,0).
This issue can be reproduced in Example 0 by rearranging your hierarchy as described. I used a game window that was sized around 1920x1080, with the panel's parent anchored to the top-left corner of the screen. The panel's clipping option was set to None. With this setup, the popup works fine if the panel and popup are in the top-left quadrant of the screen. If you move the panel (along with the popup) over to the bottom-right quadrant of the screen, you will see that the popup's "Drop-down" object will be constrained to the top-left quadrant of the screen.
Commenting out this code near the end of UIPopupList.Show() fixed this issue for me:
Transform pt = mPanel.cachedTransform.parent;
if(pt !=null)
{
min = mPanel.cachedTransform.TransformPoint(min);
max = mPanel.cachedTransform.TransformPoint(max);
min = pt.InverseTransformPoint(min);
max = pt.InverseTransformPoint(max);
}
Title: Re: Bug: UIPopupList position bug when the panel is offset from the panel's parent
Post by: ArenMook on July 01, 2016, 10:16:46 PM
Hmm... Thanks, I'll make the modifications on my end and see if this will cause any adverse effects.