Author Topic: Popuplist problem  (Read 9695 times)

DJVDJV

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Popuplist problem
« on: January 13, 2016, 06:52:56 AM »
Hellos,

Many of my popuplaist "opens" over wrong popuplist  (look attachment where "Resolutions"-options open over "Quality PopUpList" )
My popuplist is just copy from "prefab toolbar" "simple popup list".. only graphics are changed. So no custom code. What might cause this?

DJVDJV

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Popuplist problem
« Reply #1 on: January 13, 2016, 08:11:35 AM »
Did further exploration. Place of popping window can wary different places in different resolutions

DJVDJV

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Popuplist problem
« Reply #2 on: January 13, 2016, 12:08:54 PM »
Even further examing:

Changed UIPopUpList.cs row 1089 to:
Vector3 offset = Vector3.zero;

Seems to fix this.. but what might cause this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Popuplist problem
« Reply #3 on: January 13, 2016, 07:31:20 PM »
That code ensures that the popup is visible on the screen and that it doesn't get clipped. I'm not sure why it's appearing in the wrong place for you. Perhaps a wrong reference somewhere?

DJVDJV

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 30
    • View Profile
Re: Popuplist problem
« Reply #4 on: January 14, 2016, 01:40:11 AM »
That code ensures that the popup is visible on the screen and that it doesn't get clipped. I'm not sure why it's appearing in the wrong place for you. Perhaps a wrong reference somewhere?

That is strange because I have changed almost nothing at all. Just UISprite and backGround & highlight textures in UIPopupList. Also got anchor "Advanced" left & right for control and bottom & top for upper label.

And this happens every places where I use UIPopupList. Not just that one "options"-menu.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Popuplist problem
« Reply #5 on: January 16, 2016, 01:19:43 PM »
The UIPopupList script uses a UIWidget attached to the same game object for the purpose of figuring out its dimensions. If you happen to have a large invisible widget there, its bottom side will be used by UIPopupList, causing the popup to appear below where you would want it. Check the widget's dimensions.