Author Topic: How to control Scroll Bar using button.  (Read 1617 times)

pawankumar113

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 11
    • View Profile
How to control Scroll Bar using button.
« on: May 13, 2014, 01:52:23 AM »
I saw the Example 7 - Scroll View (Panel) in NGUI. But how to use button to Scroll the Object.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to control Scroll Bar using button.
« Reply #1 on: May 13, 2014, 08:44:32 AM »
Modify the scroll bar's value using some logic, for example:
  1. void OnClick ()
  2. {
  3.     scrollBar.value += 0.1f;
  4. }