Author Topic: Sliding toggle Button  (Read 5171 times)

dendenny01

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 0
  • Posts: 4
    • View Profile
Sliding toggle Button
« on: June 20, 2014, 11:57:45 PM »
It been quite a while I have been using NGUI and it had worked like a charm for me.
I would like to know how can I achieve the sliding toggle Button Behavior
the toggle Button I am looking is like the On/off slide button in Iphone where you have to slide
to change the state


How can I create this sliding Button any help will be appreciated

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Sliding toggle Button
« Reply #1 on: June 21, 2014, 03:37:53 PM »
Slider with 2 steps, foreground being the green sprite and background being the red sprite. The thumb sprite should have a script that sets slider's value to either 0 or 1 -- the opposite of what it is now.