Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: baby_demon on March 22, 2013, 02:52:25 AM

Title: UIDraggable Panel: How to loop the panel like the Clock app on Iphone
Post by: baby_demon on March 22, 2013, 02:52:25 AM
(http://cache.lifehacker.com/assets/images/17/2011/09/okite.jpg)
See this Image

I want to make an Panel like this style. You can call it loopable panel  ;D
But I don't know how to make it happen.
Any one help me please.
Title: Re: UIDraggable Panel: How to loop the panel like the Clock app on Iphone
Post by: sndwav on March 26, 2013, 06:11:33 PM
Hi, I would also like to make something similar to that...
Just like Example 7: "Scroll View (Panel)", but looping on both ends.

Can anyone suggest a way please?
Title: Re: UIDraggable Panel: How to loop the panel like the Clock app on Iphone
Post by: baby_demon on April 09, 2013, 09:31:03 PM
Please!
I post 2 topic and no one here can help or reply!
Title: Re: UIDraggable Panel: How to loop the panel like the Clock app on Iphone
Post by: ArenMook on April 09, 2013, 09:48:21 PM
There have been similar threads on this forum if you do a search. To save you time, summary is: reposition children when they get outside a certain range back to the opposite side.
Title: Re: UIDraggable Panel: How to loop the panel like the Clock app on Iphone
Post by: sndwav on April 18, 2013, 02:59:12 PM
I couldn't find the other threads you mentioned :/

Can you please explain how do I access the UIGrid's children so I could re-position them?

Thanks!
Title: Re: UIDraggable Panel: How to loop the panel like the Clock app on Iphone
Post by: ArenMook on April 18, 2013, 05:12:02 PM
uiGridObject.transform.GetChild(i) where i goes up to transform.childCount
Title: Re: UIDraggable Panel: How to loop the panel like the Clock app on Iphone
Post by: sndwav on April 19, 2013, 09:04:06 AM
Thank you! :)
Title: Re: UIDraggable Panel: How to loop the panel like the Clock app on Iphone
Post by: sndwav on April 21, 2013, 01:52:00 PM
Another quick question regarding this...
I've read that NGUI elements use the .localPosition instead of .position
But when I scroll around, the localPosition doesn't get updated at all...

  1. void Update () {
  2.                 Debug.Log("localPos 1st child "+ grid.transform.GetChild(0).localPosition);            
  3.         }

That log always gives the initial position that the child was positioned at in the Scene view (as I scroll it back and forth in-game),
so I can't really check if its position has reached a certain limit.

Am I missing something here?
Thanks.
Title: Re: UIDraggable Panel: How to loop the panel like the Clock app on Iphone
Post by: ArenMook on April 21, 2013, 07:14:04 PM
http://www.tasharen.com/forum/index.php?topic=3927.msg19179#msg19179