Author Topic: How can I disable interactive objects when they are moving?  (Read 1331 times)

neunundneunzig

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
    • View Profile
I have build a UIGrid and put some button in it, then use other two buttons to scroll the grid as pages.

Now since grid has its own scrolling speed, when I click the button in the page which are not totally scrolled in, button event will be triggered, even the page it belongs still half culling outside the grid.

It there any way I can disable the content outside of the clip?


For example, as you can see the grid is moving, but I can click Envovle or Button as soon as I react fast enough. Even they belong to two different grid Item.

The ideal is you cant click any of them since the whole grid is moving.

Any thoughts?
Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How can I disable interactive objects when they are moving?
« Reply #1 on: May 23, 2014, 04:09:25 PM »
I think there are two questions here. How to disable content outside the clip area? This is done automatically by NGUI if the UICamera's event type is set to UI. Clip area clips events. The second question I see is how to disable clicking on buttons when the grid is moving. You can do that by disabling colliders of stuff within.