I have a slider with a range of (0, 2, 0.01). While the float number can be stored to the settings file correctly, when I open up the settings tab again, the slider will load the float value, but display it after some rounding.
This is only a UI stuff, and the actual value in the settings file is untouched.
Yep I used to do this. I even append a text label insteadof using the dynamic text to host the actual value back. But the conversion code looks nasty lol
I use the slider to adjust the scale of images. It works correctly for the first adjust, and save a float value to my data.json.
However, if I close down and reopen the settings tab, the constructor would call setValue to pass the current scale value to the slider, and here comes the problem. A float value from the local storage will be rounded by the slider to a integer, and then display. Both the tooltip and the position show that there is a rounding when executing setValue(). You can pass some consts to reproduce this.