Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: primus88 on August 31, 2013, 02:53:16 PM

Title: NGUI slider / tooltip quick questions
Post by: primus88 on August 31, 2013, 02:53:16 PM
Hello guys,

I have two questions as I couldn't find a way to implement this :

1. I have a slider. How can I implement a method where if I click anywhere on the slider it modifies to that position ? So you are able to change the slider value either by clicking anywhere on it or by dragging the nob of the slider.
2. How can I make the tooltip appear faster (even instant) ? I know how to alter the transition time, but how about the actual time when the tooltip begins to show from the moment you hover with mouse pointer over the trigger.

Thank you.
Title: Re: NGUI slider / tooltip quick questions
Post by: LightSky on August 31, 2013, 07:19:35 PM
I haven't tinkered with slider at all so I can't really say, however you can change the Tooltip settings via the UI Camera in the inspector.
Title: Re: NGUI slider / tooltip quick questions
Post by: Nicki on August 31, 2013, 08:24:50 PM
Measure the click's relative position on the collider and translate into slider values between 0-1.

Doesn't it do this default? I'm sure I've seen it in the examples.
Title: Re: NGUI slider / tooltip quick questions
Post by: LightSky on September 01, 2013, 12:47:32 AM
Doesn't it do this default? I'm sure I've seen it in the examples.

Ya, just tried it in the example scene and it works fine off the bat with the click's relative position.
Title: Re: NGUI slider / tooltip quick questions
Post by: primus88 on September 01, 2013, 04:55:19 AM
That is the UIScrollBar, I have the UISlider.

Anyone knows how to have the same functionality for the slider ?
Title: Re: NGUI slider / tooltip quick questions
Post by: primus88 on September 01, 2013, 09:52:05 AM
Found the problem.
For the camera GUI the event receiver was 'GUI' layer set for me, while the slider had 'default' layer. Changing the layer to 'GUI' solved it.

Thanks guys. Now I have solutions for both issues.