12-30-2012 01:26 PM
I want to create slider that accepts integer values only.
For example: from 1.0 to 5.0, step: 1.0
How to do this?
Solved! Go to Solution.
12-30-2012 01:47 PM
In a word, DIY
There is no integer slider in Cascades.
Wrap the standard floating-point (continuous) Slider into you own class.
Listen to the valueChanged(float) and immediateValueChanged(float) signals.
Emit your own signals when slider moves from one discrete value to another.
Fix continuous slider position to the nearest discrete value in the valueChanged(float) signal handler.
For each continuous slider position you'll need to find the nearest discrete value.