Author Topic: How to change the Panel depth ?  (Read 4286 times)

xiaoniaojjj

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
How to change the Panel depth ?
« on: October 17, 2012, 03:03:35 AM »
If i have a few panel in one "UI Root (3D)UI", I want to adjust the panel depth , like i want the target panel show the top layer!

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: How to change the Panel depth ?
« Reply #1 on: October 17, 2012, 06:10:17 AM »

xiaoniaojjj

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
Re: How to change the Panel depth ?
« Reply #2 on: October 17, 2012, 10:01:45 AM »
Thanks reply, I almost understand it, But my problem is, I have 2 panels, sames Atlas,Fonts,Layers, Z value of Panels A is -1, value of Panel B is 0, It looks right in Scene Window(0.jpg), but  error in Game Wiindow(1.jpg).  In fact, The B received Event before A.  I try to set Z value of A is -10. Everything is ok.
My trouble is, i don't know how to control the Z value of Panel accurate ,  Right now i just can try the Z value to correct.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to change the Panel depth ?
« Reply #3 on: October 17, 2012, 10:14:28 AM »
Adjusting depth also moves widgets along the Z a little, so -1 may have been too small. -10 is noticeable, so that's why it works. In Windward my panels have depth ranging from 10 (background HUD) to -100 (modal dialog window).