Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: DoctorWhy on August 10, 2012, 12:45:38 PM

Title: OnClick with a slider
Post by: DoctorWhy on August 10, 2012, 12:45:38 PM
I have an NGUI slider that I need to do something once the user lets go of the slider.  I have a script with the OnClick event in it.  I tried putting it on the slider itself, but OnClick is never called.  I then tried to put it on the thumb, and it is still never called.  Where does OnClick need to go, or what can I do to get OnClick (MouseUp event) to register on a slider?
Title: Re: OnClick with a slider
Post by: PhilipC on August 10, 2012, 01:03:35 PM
If you only want to do something when the user lets go have you tried using OnPress and watching for when the pressed = false?
Title: Re: OnClick with a slider
Post by: DoctorWhy on August 10, 2012, 01:16:25 PM
That works!  Simple enough.  Thank you!  I don't really know why OnClick doesn't work, but oh well.
Title: Re: OnClick with a slider
Post by: PhilipC on August 10, 2012, 01:20:37 PM
I tried it as well and am not 100% on that on but for your purposes of only need to know when they release OnPress works :).