Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: nilton_felicio on March 26, 2013, 09:00:06 AM

Title: Scroll bar problem size
Post by: nilton_felicio on March 26, 2013, 09:00:06 AM
I'm using componete Scroll Bar with Background and Foreground with simple sprite type. I do not want sliced​​. I packed my sprites so as not to distort. The problem is that when the value reaches "0" or "1" distorts. I would not distort. How to solve? Photo attached. Thank you and sorry for my English.

(http://img41.imageshack.us/img41/6843/nguiscrool.jpg)
Title: Re: Scroll bar problem size
Post by: Nicki on March 26, 2013, 11:49:30 AM
You're using the Button as a foreground? It should be used as a thumb, then it won't be distorted. Look in the the example that comes with unity for how to; or make a new slider, just to see it.

I hope that helps.
Title: Re: Scroll bar problem size
Post by: nilton_felicio on March 26, 2013, 12:58:45 PM
Scroll Bar comprises Background and Foreground. With Slider thumb is. I'm not using Slider. And it just this distorted when it reaches "0" or "1". As he glides through the distortion does not happen, everything is perfect.
Title: Re: Scroll bar problem size
Post by: nilton_felicio on March 26, 2013, 02:05:14 PM
Problem solved. The background must have the same height as the forenground.
Title: Re: Scroll bar problem size
Post by: biggestgeek on November 21, 2013, 03:58:19 AM
Hi, I was searching in the forums and came across this thread. I have the exact same problem as described above but can't seem to find a solution, even after changing the sizes. The dimensions of my scroller/forground would resize itself when the value of the scroll bar is 0 or 1.
Title: Re: Scroll bar problem size
Post by: ArenMook on November 21, 2013, 04:14:20 AM
1. Use a UIWidget for the foreground (since it's invisible).
2. Create a separate sprite for the thumb.
3. Attach a UIAnchor to the sprite from step 2, and make it use the foreground widget from step 1 as the container.
Title: Re: Scroll bar problem size
Post by: biggestgeek on November 21, 2013, 04:38:14 AM
Hi ArenMook,

Sorry for being a noob but it didnt quite work. What I did was use:
1.Add UIWidget Container to the foreground Game Object.
2.Create a separate sprite for the thumb.
3.Attached a UIAnchor script to the sprite which I just created and dragged the Foreground GO into the Container portion of the script.

Am I doing it correctly? What I got was i could not even move the scroll bar or interact with it.
Title: Re: Scroll bar problem size
Post by: ArenMook on November 21, 2013, 05:13:04 AM
No, not widget container. UIWidget.
Title: Re: Scroll bar problem size
Post by: biggestgeek on November 21, 2013, 06:04:32 AM
I can't seem to add it. Tried the short cut of ALT+SHIFT+W but nothing happens.
Title: Re: Scroll bar problem size
Post by: ArenMook on November 21, 2013, 02:18:37 PM
With what version of NGUI?
Title: Re: Scroll bar problem size
Post by: biggestgeek on November 21, 2013, 08:36:32 PM
I'm using version 3.0.2 I'm assuming thats the latest version?
Title: Re: Scroll bar problem size
Post by: ArenMook on November 22, 2013, 03:22:28 AM
Nope. 3.0.5 / 3.0.6 depending on your access level.

http://www.tasharen.com/forum/index.php?topic=11