Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Alessaint on April 14, 2014, 12:10:42 PM

Title: UIWrap Content - compass
Post by: Alessaint on April 14, 2014, 12:10:42 PM
Hi,

what would we the best way to create a compass bar with UIWrap Content? What would I need to adjust to change its position within the Scroll view based on current camera heading?

Thanks.
Title: Re: UIWrap Content - compass
Post by: ArenMook on April 15, 2014, 09:14:10 AM
What's a compass bar? Some pics might help.
Title: Re: UIWrap Content - compass
Post by: Alessaint on April 15, 2014, 09:21:05 AM
What I mean is is text stripe containing "W nw N ne E se S sw" at the top of the screen which scrolls horizontally as you change where your camera is facing. If you face North, the stripe will move so that  the "N" element is in the middle etc. So what I need is to know what value I can change to change x position of the row containing the elements within the scroll view - whatever I tried moved the row but it broke the wrapping function.
Title: Re: UIWrap Content - compass
Post by: ArenMook on April 15, 2014, 10:01:25 AM
I wouldn't use the wrap content for that as you need to be the one who controls it based on some object's angle of rotation. Look at the code inside the UIWrapContent and write something similar that will simply move the 8 labels around within a clipped panel. It shouldn't even be a scroll view.
Title: Re: UIWrap Content - compass
Post by: Alessaint on April 15, 2014, 10:27:06 AM
Ok, I'll have a look. Thanks.