Author Topic: Soft clip center moves with scroll bar  (Read 4717 times)

Hugo

  • Guest
Soft clip center moves with scroll bar
« 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

Hugo

  • Guest
Re: Soft clip center moves with scroll bar
« Reply #1 on: April 09, 2013, 11:15:33 AM »
Also: I work with the 95$ version of NGUI.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Soft clip center moves with scroll bar
« Reply #2 on: April 09, 2013, 09:34:07 PM »
"Skyrim UI" example, "Useful Stuff" sticky.

Hugo

  • Guest
Re: Soft clip center moves with scroll bar
« Reply #3 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.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Soft clip center moves with scroll bar
« Reply #4 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.

Hugo

  • Guest
Re: Soft clip center moves with scroll bar
« Reply #5 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!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Soft clip center moves with scroll bar
« Reply #6 on: April 16, 2013, 02:26:06 PM »
I'm not sure what I'm looking at in there to be honest.

Hugo

  • Guest
Re: Soft clip center moves with scroll bar
« Reply #7 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.
« Last Edit: April 18, 2013, 03:26:54 PM by Hugo »

Hugo

  • Guest
Re: Soft clip center moves with scroll bar
« Reply #8 on: April 18, 2013, 03:26:25 PM »
no answer?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Soft clip center moves with scroll bar
« Reply #9 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.

jindave

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 6
    • View Profile
Re: Soft clip center moves with scroll bar
« Reply #10 on: May 31, 2013, 08:14:10 AM »
Hi, I have same problem, have you any solution ?
« Last Edit: May 31, 2013, 09:01:04 AM by jindave »

Lumind

  • Newbie
  • *
  • Thank You
  • -Given: 5
  • -Receive: 0
  • Posts: 14
    • View Profile
Re: Soft clip center moves with scroll bar
« Reply #11 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
« Last Edit: May 13, 2014, 02:07:13 AM by Lumind »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Soft clip center moves with scroll bar
« Reply #12 on: May 13, 2014, 08:46:24 AM »
This is an old post. Please make a new one and provide more details.