Author Topic: Resize UIScrollBar  (Read 2363 times)

thehangedman

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 4
    • View Profile
Resize UIScrollBar
« on: November 22, 2013, 12:34:08 PM »
Hello,

I used to resize a scrollbar (on container resize) by resizing the background sprite.

This method doesn't work since this change:
FIX: Redesigned the scroll bar. It now uses the foreground sprite's starting dimensions as its full size instead of the background.

How do I resize a scrollbar in runtime now?

The most convenient would be to retain the old behaviour - at least optionally, but I can't find any way to resize a scrollbar at all now.

Thanks!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Resize UIScrollBar
« Reply #1 on: November 22, 2013, 04:07:33 PM »
I'll add the following two properties:
  1. /// <summary>
  2.         /// The starting position of the foreground sprite gets saved when the script starts up.
  3.         /// You can adjust it after the fact by using this property.
  4.         /// </summary>
  5.  
  6.         public Vector3 startingForegroundPosition { get { return mStartingPos; } set { mStartingPos = value; } }
  7.  
  8.         /// <summary>
  9.         /// The starting size of the foreground sprite gets saved when the script starts up.
  10.         /// You can adjust it after the fact by using this property.
  11.         /// </summary>
  12.  
  13.         public Vector2 startingForegroundSize { get { return mStartingSize; } set { mStartingSize = value; } }