Author Topic: NGUI to place a popup in the same UI root or not?  (Read 2061 times)

coxy17

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
NGUI to place a popup in the same UI root or not?
« on: January 16, 2017, 03:24:57 AM »
Hi

I have setup my game and added some screen controls (jump etc) then i have one button which will activate a popup. I have no problem with this process. At the moment i have the popup menu alongside my screen control buttons, just with a higher widget depth. Is this the best practice for popups? in terms of where i have it now or is it best practice to have popups in there own separate UI Root?

Nick

Holy Manfred

  • Jr. Member
  • **
  • Thank You
  • -Given: 1
  • -Receive: 8
  • Posts: 71
    • View Profile
Re: NGUI to place a popup in the same UI root or not?
« Reply #1 on: January 16, 2017, 09:42:28 PM »
That should not be a problem given your depth is set correctly. But I'd always put popups in their own panel at least to make it easier to bring them on top when you have multiple windows open for example.
Having multiple UIRoots shouldn't break anything but is probably unnecessary in most cases.

coxy17

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Re: NGUI to place a popup in the same UI root or not?
« Reply #2 on: January 30, 2017, 03:54:18 AM »
thanks for this, seems like the best approach.