Author Topic: Disabling Interaction While Tweening  (Read 1806 times)

Sarper

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 21
    • View Profile
Disabling Interaction While Tweening
« on: June 02, 2015, 07:12:45 PM »
I want to use position tweens for the transitions between my panels but I want it so that player won't be able to interact with any UI element while the position tween is playing.

Does NGUI have any utility to handle that or do I disable every element's collider for example wherever I call the PlayForward() and re-enable them on OnFinished?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Disabling Interaction While Tweening
« Reply #1 on: June 07, 2015, 12:26:05 PM »
Easiest thing to do is to create a panel with higher depth than other panels, then place a full-screen widget underneath it with a collider (ALT+SHIFT+W, ALT+SHIFT+C). It will intercept all events. Either that, or turn off events on the UICamera.

Sarper

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 21
    • View Profile
Re: Disabling Interaction While Tweening
« Reply #2 on: June 17, 2015, 02:17:56 AM »
Easiest thing to do is to create a panel with higher depth than other panels, then place a full-screen widget underneath it with a collider (ALT+SHIFT+W, ALT+SHIFT+C). It will intercept all events. Either that, or turn off events on the UICamera.

Thanks, will keep those in mind. I've ended up changing the state of all the buttons, I wanted to show their disabled color too.