Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: HollyPixel on April 09, 2014, 09:01:46 AM

Title: Controlling scrollbars with buttons?
Post by: HollyPixel on April 09, 2014, 09:01:46 AM
Hey,

I've been having a search around and can't seem to find the answer to "is there a way to add buttons controls to a scrollbar?".

Like with Windows etc, while also keeping the draggable thumb working too - I've attached a screenshot of what I'm working so you have a better idea of what I mean.

All the scrollview and draggable stuff is working fine but I kinda wanted to just add some nice buttons to finish it off =)
Title: Re: Controlling scrollbars with buttons?
Post by: ArenMook on April 10, 2014, 06:34:09 AM
You can create those buttons, sure -- to make them work, you will be adjusting the UIScrollBar's values by certain amounts like
  1. void OnClick()
  2. {
  3.     scrollBar.value += 0.1f;
  4. }