Author Topic: Spring Panel revolutionary fix :)  (Read 3759 times)

AGB

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 74
    • View Profile
    • Steam Defense
Spring Panel revolutionary fix :)
« on: June 19, 2014, 10:55:34 AM »
Hello, guys! Why dont we put this code inside SpringPanel script?

if (mDrag != null)
{
mDrag.UpdateScrollbars(false);
if (mDrag.restrictWithinPanel)
{
mDrag.RestrictWithinBounds(true);
}

}



So - if we use UICenterOnClick - it does not fly away from bounds!
I'm a busy man... I have places to go,monsters to kill...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Spring Panel revolutionary fix :)
« Reply #1 on: June 19, 2014, 06:35:21 PM »
Look at what happens to the Scroll View example with your change.

Also, Center On Child is meant to do just that -- center on the specified child. This won't work with your change.