Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: devotid on May 18, 2012, 03:35:25 AM

Title: UIslider with float values of 2000-4000? Help?
Post by: devotid on May 18, 2012, 03:35:25 AM
im trying to control a global variable with a NGUI slider and CANNOT figure out how to get from 0-1 to values like 20000-40000?

In Playmaker and unity i can ussually just set the beginning and end values and im done........:/

How can i do this in NGUI with only 0-1 values?

I have about 15 different sliders to configure (all with different amount of steps and value scales) so i didnt want to do math for all of these if i didnt have to.

Thanks very much for the help.

Kevin
devotid
Title: Re: UIslider with float values of 2000-4000? Help?
Post by: ArenMook on May 18, 2012, 03:47:36 AM
  1. yourValue = Mathf.Lerp(start, end, slider.sliderValue);
Title: Re: UIslider with float values of 2000-4000? Help?
Post by: devotid on May 18, 2012, 06:54:27 AM
Thank you very much....... 8)

Kevin