Author Topic: Fixed-size scrollbar foregrounds (handles)  (Read 4189 times)

ferretnt

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 23
    • View Profile
Fixed-size scrollbar foregrounds (handles)
« on: May 30, 2013, 12:39:23 PM »
Hey Aren,

I want to make a fixed-size (vertical) scrollbar handle, i.e. the scrollbar handle is always a fixed-size sprite (actually 40x40).

The interaction between UIScrollbar and UIDraggablePanel is relatively complex by NGUI standards, so I wanted to ask if there's a simple way to do this, as I couldn't see an easy one just by forcing, say, UIScrollBar.barSize somewhere.

Is there an elegant way to do this? I can make the blob the right size outside of NGUI just by adding a funciton with a lateUpdate to rescale the scrollbar, but then it won't move the full length of the scrollbar (because it stops when the bottom of the scaled widget would have hit.

Thanks,
Alex

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Fixed-size scrollbar foregrounds (handles)
« Reply #1 on: May 30, 2013, 05:36:01 PM »
You will need to modify the scroll bar to achieve this, as scroll bar is not meant to have a fixed size.