Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: klept on November 02, 2012, 12:36:58 AM
-
Hello this is my first post ;D I have a problem. I have a ScrollView (Clipped Panel version) with huge amount of colliders (buttons) these buttons can be clicked when they are clipped (they shouldn't) how should I approach this problem? sorry if this is repost/noob question. I searched in google and read the f.a.q's and didn't find anything.
Thanks in advance!
-
Same way it's handled in the scroll view example. Put a big collider covering the area where the items can be scrolled out of view.
-
I have the same problem and placing colliders outside the list is not possible in the project I'm working on.
We have a dynamically build UI with several panels with buttons and lists. Placing colliders to block clipped colliders, will also block other ui interactions.
It might be solved if NGUI casted events like OnVisible/OnInvisible - then colliders could be turned on or off. But NGUI does not support that to my knowledge.
Do I really have to write my own scroll list view from scratch?
Any ideas would really be appreciated?
-
I suggest modifying the UICamera's Raycast function then. You will want to RaycastAll instead, and for each hit, GetComponent<UIWidget>(), see if its panel is clipped, and if it is -- check -- is the point within view? If yes, it's a valid event. If not, skip it and move on to the next hit.
-
Btw, you will see this already built-in with the next version of NGUI.
-
Btw, you will see this already built-in with the next version of NGUI.
Are there any information when the next version will be released? We are currently making some prototypes, to test if ngui could replace our existing ui system and this is a very critical point for us.
-
I already released version 2.2.4 and 2.2.5 to Pro users, so shouldn't be long now. 2.2.6's ETA is likely tomorrow.
-
Aw man, I wish I was a pro user.
-
Cool ;-)