Author Topic: Popup appearing under Grid items  (Read 2879 times)

GarethF

  • Guest
Popup appearing under Grid items
« on: May 10, 2012, 11:07:00 AM »
Having problems with a popup appearing under a grid list of entries. The popup elements (label, background sprite) have the higher depth. But they appear under the grid entries (grid containted in a clipping panel, if that makes a difference).

I tried moving the popup Z forward, but then the items in the grid list simply disappeared.

Any suggestions?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Popup appearing under Grid items
« Reply #1 on: May 10, 2012, 02:28:48 PM »
This is because your font is using a different atlas than your UI.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Popup appearing under Grid items
« Reply #2 on: May 10, 2012, 02:29:22 PM »
P.S. Double-check your font -- what shader is it using?

GarethF

  • Guest
Re: Popup appearing under Grid items
« Reply #3 on: May 11, 2012, 04:14:59 AM »
I'm only using one atlas, the font and the UI sprites are both in it.

Shader is Unlit/Transparent Colored.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Popup appearing under Grid items
« Reply #4 on: May 11, 2012, 02:33:37 PM »
Ah, it might also be because you have a clipped panel that's drawn on top of the drop-down list. You can switch the list to expand upwards instead.

GarethF

  • Guest
Re: Popup appearing under Grid items
« Reply #5 on: May 12, 2012, 09:05:20 AM »
Is there any way to force objects to draw on top of the clip panel contents?

I have this problem again here. I want to show a 'load deck' popup dialogue over the main deck editing screen. You can see the library card list is generated on the right, but when I show the load dialogue the cards are rendered over it, regardless of the depth I set for them or the Z order, it seems? (The load dialogue also uses a clip panel, for the the dynamically generated file name list.)


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Popup appearing under Grid items
« Reply #6 on: May 12, 2012, 04:27:34 PM »
You need to play with Z values. The panel you want in front needs to be moved forward (-Z). Also, if you ever have a situation where you have something like:

Widget 1 (Atlas A)
Widget 2 (Atlas B)
Widget 3 (Atlas A)

all under the same panel, you are going to have troubles, because widgets 1 and 3 will be merged into one draw call, which will be either before or after Widget 2's. You will need to separate 1 and 3 by using an extra panel.