Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: syslord2k2 on April 02, 2014, 04:10:32 AM
-
Hi everybody,
i am sorry if this question was already answered but i didn't find it with the search function.
So i have these buttons that play a tween and then disappear but i don't want the user to be able to press another button while the tween is playing.
Is there a possibility to tell ngui to not process touch events?
Best regards
Michael
-
You can have a collider that covers these buttons and enable it when you don't want them to be pressed and disable it when the tweens have finished.
-
ALT+SHIFT+W to add a widget. ALT+SHIFT+C to give it a collider. Resize to cover the area you want to not respond to events. Adjust the depth like any other widget.
-
Hi guys,
thanks for the responses, i had that idea myself but it seemed too much effort since i had to do extra colliders for every button and activate and deactivate components to handle them.
I ended up adding a shouldProcessEvents public bool to the UICamera that would return the update function in line 963 if it was false and created a component that i added to every button that would set it to false, wait for a given amount of seconds and then set it to true again.
Works like a charm but of course i have to be really careful with NGUI Updates now :)