I’m just starting a new thread for image sliders, as opposed to FilmStrip ones. @Gerbo, I’m pinging you with this one. Things look a little better now, but there are still issues as you can see below.
In summary:
There is still a little jump if you don’t click the centre of the slider thumb. I’ve check with native JUCE sliders and this is the case too. I guess that’s why they use such thin thumbs.
Because I had to resize the actually slider, mouse events on the very outer extremes of the slider container are not registered with the underlying slider. If I added a mousedown event handler here it would break the functionality of the slider that this widget contains.
The last thing to try here is adding a custom thumb component, with its own mouse event handler that then pass on the position info to the slider. It’s messy, but I think it might be the only solution.
If I understand you, I think it will be just as easy to draw the entire thumb onto a custom component. I might not get a chance to try this for a few days. I’ll let you know when I have something to show.
Nice job! I have already tested it.
The click is now accurate, and nothing moves at all.
It is being very successful, and you are very close.
I will implement it in the next job which is already well advanced and uses two large sliders. For now I have them with filmstrip, but I would like to test them this way.
Nice. I will also have to think about the tracker image? I assume you want to provide your own? Once I have all these things added I will remove the old style way of using images with sliders en lieu of this one. I think this way will actually be easier to manage and maintain.
Can you try the latest dev tip now? I’ve added support for the background image too. I’m not sure about resizing though. Should we show the images at 100% or apply resizing? If one uses a slider the same height as the image then no scaling should apply. But if you don’t scaling will take place. Note that no scaling takes place with the thumb component.
By assigning the same length as the background image, the fader does not reach the end of the edges.
I see that it works for you, but it gives me that limitation.
Can you try the latest dev tip? In this version the tracker image is draw from position 0,0. The underlying slider, which is resized, has no effect on it.
Are you using any new code in the csd? In these last two tests, I do not have any variation, and I still have the problem that it does not go to the extremes. Could it be that the development branch is not up to date?
I’m sorry, I just tried this new version on my laptop and it’s all wrong I must have forgot to push from my work PC. I will do this first thing tomorrow morning. I’m sorry again about that, I never noticed until you mentioned it.
I have tested it, and it works with great precision, but I think that the default parameters and scene memorization still need to be implemented. An elegant and fine work