Author Topic: Disable "Blocked" buttons?  (Read 2929 times)

edisonfloyd

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 6
    • View Profile
Disable "Blocked" buttons?
« on: July 20, 2013, 11:39:50 PM »
I have menus that sit on top of each other and I only want to be able to interact with the highest buttons and such. Is there any way to not have onclick events sent to items that are blocked by other ngui items?

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Disable "Blocked" buttons?
« Reply #1 on: July 21, 2013, 02:47:40 AM »
Add colliders to them.

Colliders in the correct layer, blocks the messages. Colliders do not use the widget depth directly, but use z position - the closer to the GUI camera, the sooner a collider is hit. Only a single collider is hit at any given moment (unless you forward events or other similar shenanigans).