Author Topic: gui event capture and filter  (Read 1517 times)

mapleegreen

  • Guest
gui event capture and filter
« on: September 06, 2012, 05:08:35 AM »
I am working on a 2d game.There two ngui panel in my game scene.my question is:If I use one panel to covered the screen,how could i to prevent the event(OnClick,OnPress,etc) passed to below panel and to the game scene object.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: gui event capture and filter
« Reply #1 on: September 06, 2012, 07:01:22 AM »
Occam's razor: the simplest answer is usually the correct one. Just create a big collider that will intercept the events before they get to the rest of your UI (generally goes on your background sprite).

mapleegreen

  • Guest
Re: gui event capture and filter
« Reply #2 on: September 06, 2012, 10:28:04 AM »
thanks you,I change the BoxColider Center.Z