Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: nathanqueija on December 04, 2014, 11:28:50 AM

Title: Min Max Slider
Post by: nathanqueija on December 04, 2014, 11:28:50 AM
Hey Guys,

Do you know if it's possible to develop a dual slider with min and max values with NGUI? Do you have any examples?

Thanks!
Title: Re: Min Max Slider
Post by: ArenMook on December 05, 2014, 12:49:33 AM
Input field on one side, slider in the middle, input field on the other side.

Slider can remain 0 to 1. In your code that uses this value, simply do a Mathf.Lerp(firstInputValue, secondInputValue, slider.value);
Title: Re: Min Max Slider
Post by: nathanqueija on December 05, 2014, 11:49:46 AM
Hey ArenMook,

Thanks for the response. But actually I'd like to have two thumbs to control the min and max range value.
Title: Re: Min Max Slider
Post by: ArenMook on December 05, 2014, 04:12:49 PM
For that you will need to create a custom widget. NGUI's slider isn't meant to have two.
Title: Re: Min Max Slider
Post by: poolts on December 05, 2014, 08:43:00 PM
I developed this exact thing recently. If I remember when I get back home on Monday I can share it here.
Title: Re: Min Max Slider
Post by: Budde88 on December 13, 2016, 10:40:33 AM
Any chance you can share?

It's more convenient to have the ability to select the values you'd like,
they have this option with the native Unity sliders, but I'm an NGUI fan.