How to change value of a LAF slider?
-
Hello!
I made a GUI slider with LAF that uses value numbers from -100 to 0 dB.
I need it to show values from 0 to 100 without decimals.What i need:
If i use obj.value + 100; the slider value shows decimals:
If i use obj.valueAsText; the value shows from -100 to 0:
Other way is to set slider value properties from 0 to 100 dB and then decrease it -100 dB in script panel, but it scares me because if somehow decreasing won't work it could damage the user ears and monitors. Or it's a good solution?
How can i change text value or delete decimal numbers in slider value?
-
@problema post a snippet with your LAF in it
-
@problema You can use
Math.round(obj.value)
It will round the decimal value to the integer value. -
@orange this is exactly what I need. Thank you!