Author Topic: Depth + Panels  (Read 6687 times)

dlewis

  • Guest
Depth + Panels
« on: April 16, 2012, 12:20:54 AM »
I'm just trying to figure out how the depth works with several nested panels, I've spent the last few hours being confused as to why the depth wasn't working and I think it's because of things being on different panel layers.

Root (Panel)
-- MainMenu (Panel)
---- Sprite 1
-- MainMenu_Extended (Panel)
---- Sprite 2

With this setup I am unable to change the depth ordering of my two sprites, regardless of the depth or z position of the object. Both of the sprites are from the same atlas (using the default sci fi for now). The UI I'm making has many components so I'm splitting them up with panels so they can be easily enabled/disabled as needed, I could remove a few panels but some are needed for things such as clipping areas.

Is this intended behaviour, bug or purely a limitation of what can be done (or too hard to be worth it)?

Thanks.
« Last Edit: April 16, 2012, 12:22:53 AM by dlewis »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Depth + Panels
« Reply #1 on: April 16, 2012, 12:31:40 AM »

dlewis

  • Guest
Re: Depth + Panels
« Reply #2 on: April 16, 2012, 12:51:03 AM »
Thanks for the clarification on that. I'll keep all that in mind when designing my UI (Solution. More panels!)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Depth + Panels
« Reply #3 on: April 16, 2012, 12:53:54 AM »
Yeeeees... <_<  :o

dlewis

  • Guest
Re: Depth + Panels
« Reply #4 on: April 25, 2012, 08:11:07 PM »
Another question. Does a UI Texture play with the depth?

I'm in a situation where most of my UI is on the same panel now but most of it only shows when the background (UITexture) further away from the camera (z position).

Is that right or is something funky with my scene?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Depth + Panels
« Reply #5 on: April 25, 2012, 09:30:00 PM »
Consult the FAQ for the question about depth / Z: http://www.tasharen.com/forum/index.php?topic=6.0