Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Hugo on April 09, 2013, 09:24:57 AM

Title: Soft clip center moves with scroll bar
Post by: Hugo on April 09, 2013, 09:24:57 AM
Hi,
I tried to make a scroll view to display a list of buttons generated in-game and be able to scroll them. But when I use the scroll bar linked to my panel, it also moves the center of the soft clip, moving the pink border and making my buttons fade at different coordinates I intended them to. I would like to know if there is a solution to stop the center of the soft clip from moving.

I precise that I searched on the forum and didn't find a solution to this problem.

Hugo
Title: Re: Soft clip center moves with scroll bar
Post by: Hugo on April 09, 2013, 11:15:33 AM
Also: I work with the 95$ version of NGUI.
Title: Re: Soft clip center moves with scroll bar
Post by: ArenMook on April 09, 2013, 09:34:07 PM
"Skyrim UI" example, "Useful Stuff" sticky.
Title: Re: Soft clip center moves with scroll bar
Post by: Hugo on April 10, 2013, 04:57:35 AM

Thank you for your answer but I looked carefully at skyrim UI and didn't really understand why you directed me to it. I scroll my buttons with the usual scroll bar (as in your example scroll view).  My problem is with the center of the soft clip that moves when I use the scroll bar and I want to keep this soft clip immobile so it doesn't move at the same time as my buttons.
I didn't see a fix to this problem in the skyrim UI example.
Title: Re: Soft clip center moves with scroll bar
Post by: ArenMook on April 10, 2013, 02:44:53 PM
Center will move only if the clip area is wider/taller than the contents. The clip area is repositioned so that it begins at the top-left of where the content begins.
Title: Re: Soft clip center moves with scroll bar
Post by: Hugo on April 16, 2013, 07:56:16 AM
hi again,
unfortunately i still have the same problem. I'm not sure I understood your previous answer correctly so I will try to explain my issue with more precision through a video. Here is the link:http://www.youtube.com/watch?v=aTX1lstdDjY&feature=youtu.be
Thanks!
Title: Re: Soft clip center moves with scroll bar
Post by: ArenMook on April 16, 2013, 02:26:06 PM
I'm not sure what I'm looking at in there to be honest.
Title: Re: Soft clip center moves with scroll bar
Post by: Hugo on April 17, 2013, 05:16:38 AM
Right, didn't seem to be so low quality before I uploaded it. Here is a new video which should be more understandable  http://www.youtube.com/watch?v=glBEA2Vdcjo&feature=youtu.be.

You can see on the video that the soft clip (pink border) moves when I use the scroll bar to move the buttons. I precise, that the buttons are generated in game and do not exist before I launch the game and decide to create them (don't know if it changes anything).

I noticed the y of the center of the clip adjusts to be always the perfect opposite of the y of my panel as in the scroll view example but it doesn't seem to be enough to keep it immobile.

My hierarchy is like this: quest log,
                                     >subpanel with soft clip,
                                          >UItable with the buttons.
Title: Re: Soft clip center moves with scroll bar
Post by: Hugo on April 18, 2013, 03:26:25 PM
no answer?
Title: Re: Soft clip center moves with scroll bar
Post by: ArenMook on April 18, 2013, 05:10:24 PM
Is your UI hierarchy pixel-perfect? Select the UIRoot and hit Alt+Shift+P. My guess is you've scaled some object in there, which is why the "perfectly opposite" values don't end up being such.
Title: Re: Soft clip center moves with scroll bar
Post by: jindave on May 31, 2013, 08:14:10 AM
Hi, I have same problem, have you any solution ?
Title: Re: Soft clip center moves with scroll bar
Post by: Lumind on May 13, 2014, 01:59:17 AM
I have the same issue as the author. How to prevent this problem when clipping center moves?
It happens with every type if clipping
Title: Re: Soft clip center moves with scroll bar
Post by: ArenMook on May 13, 2014, 08:46:24 AM
This is an old post. Please make a new one and provide more details.