Author Topic: Controlling scrollbars with buttons?  (Read 1256 times)

HollyPixel

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Controlling scrollbars with buttons?
« 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 =)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Controlling scrollbars with buttons?
« Reply #1 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. }