Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Tripwire on December 17, 2012, 06:40:06 AM

Title: ScrollView Example 7 Spring Momentum & TweenAlpha question
Post by: Tripwire on December 17, 2012, 06:40:06 AM
Hi,

I've been recreating the scrollview from example 7 (clipped panel). But with lesser items in the UIGrid. I have 12 items in the Grid but i can't get te scrollview to align the images properly. Check the screenshots below:

Normal
(http://www.plaatjesdump.nl/upload/b6208ed04b83347161fbc06a79d9ac5d.jpg)

Drag Right
(http://www.plaatjesdump.nl/upload/c9d788b8bf4b7cc43545ff56688748f8.jpg)

Drag Left
(http://www.plaatjesdump.nl/upload/018ca6f9cd9c081e7d10c35dd3069f22.jpg)

As you can see the last image (on the left or right depends on which direction your scrolling), is always aligned to the center instead of the edge of the panel.

And another question, can i TweenAlpha an UITexture? I had the background texture win my atlas first then TweenAlpha worked on it. But now i have the same texture as a UITexture and now my TweenAlpha doesn't work anymore.
Title: Re: ScrollView Example 7 Spring Momentum & TweenAlpha question
Post by: ArenMook on December 17, 2012, 09:42:33 AM
In that example the items align to the edge if the "center" option is not checked. If it is, the closest item to the center of the panel is used instead. My guess is you are using that without realizing what it does.
Title: Re: ScrollView Example 7 Spring Momentum & TweenAlpha question
Post by: Tripwire on December 17, 2012, 10:22:58 AM
Thx man that helped! It's working perfectly now.

Now on to the other question, how about the TweenAlpha on an UITexture?
Title: Re: ScrollView Example 7 Spring Momentum & TweenAlpha question
Post by: ArenMook on December 17, 2012, 11:45:48 AM
You need to use a shader that has alpha for your UITexture such as "Unlit/Transparent Colored". By default textures use "Unlit/Texture" as I recall, which doesn't have an alpha component to work with.
Title: Re: ScrollView Example 7 Spring Momentum & TweenAlpha question
Post by: Tripwire on December 17, 2012, 01:41:22 PM
Thx ArenMook it works perfectly now :)