I’m really ashamed, but I’m completely lost in this Slider stuff.
I have an AdvancedSlider class to set a few things easier. In most cases I’ll use it in four modes:
- Linear for integers (snapping 1.0, it works)
- Linear for floats (no snapping, it works)
- IncDec for integers (snapping 1.0, it works)
- IncDec for floats (no snapping, but I’d like to have for example 10.0 inc-dec when I click the buttons, but let the user to type the number they want)
I’ve seen two approaches:
- setRange(min, max, step) - for IncDec floats it’s not an option
- snapValue(value, dragMode) - this method just doesn’t run, and I don’t know why
Additionally is it possible to use setRange() with (-inf, inf, 10.0)? Or let’s say (0.0, inf, 10.0)? It looks like it’s not. IncDec mode works only when I use setRange, but I don’t want to limit the range, and for floats I’d like to use the step only for the IncDec buttons, but let the user to type they want (as I wrote above). It makes sense of course only for IncDec, for Linear I have to know the range.
Another question. Does Rotary has an option for infinite rotation? Apple has this kind of knob, that can turn round and round, and based on the direction and velocity of rotation it increments or decrements it’s value, but it doesn’t have a start and end position. Does this exist, or I have to write this kind of functionality myself, and hide the default UI?
Please help me! It’s a stable, node-based, multithreaded app, and I can’t solve my problem with a Slider…