You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arma 3 Version:2.06 (stable) **CBA Version:** 3.15.6(stable) **ZEN Version:**1.12.1` (stable)
Mods:
- CBA_A3
- ZEN
Description:
When using the dynamic dialog slider with the option for 0 decimals it can still return decimal numbers below the shown number:
["SLIDER","Detective Count", [0,10,1,0]]
Ingame I can set two different values with the same value shown in text-box. First one where I entered 1, so I know its directly set on 1. The second one I dragged the slider until it said 1. As you can tell the slider position differs between them, but both still show 1. When clicked ok the result passed for the second screenshot is: 0.930346 or some decimal number below 1.
It seems like the editbox field correctly gets "rounded" to the nearest number but the value sent when clicking ok, is the raw value that is not rounded. This then causes errors when the value returned is used in for-loops as limits.
Expected behavior:
I expected that when selecting using 0 decimals the value in the field I see is the one that is passed on when clicking "confirm".
Steps to reproduce:
Add the steps needed to reproduce the issue.
Use a dynamic dialog slider with 0 decimal option
drag the slider a bit lower than where it is when it says 1.
See the value it returns being a decimal number instead of integer.
The 4th argument specifies the formatting of the value in the edit box (i.e. it can also accept code for custom formatting). Easiest solution is for the calling code to round the value. We could expand the control type to also support snapping the slider to the nearest "increment" when released but not sure how useful that is.
Yes, I changed ro use round when I found the issue. And that works fine. It was more based on the description of the slide options, I understood it as the option would "round" the value as the editbox shows. I would at least advice making it a bit more clear on the documentation page, as I ended up having an intermittent bug for quite a while before I realised that was what happened.
Snapping the slider to the decimal increments chosen in the option would make a lot of sense. As most time it seems like people use the slider to drag until the editbox show what they want to choose.
Arma 3 Version:
2.06 (stable) **CBA Version:**
3.15.6(stable) **ZEN Version:**
1.12.1` (stable)Mods:
Description:
When using the dynamic dialog slider with the option for 0 decimals it can still return decimal numbers below the shown number:
Ingame I can set two different values with the same value shown in text-box. First one where I entered 1, so I know its directly set on 1. The second one I dragged the slider until it said 1. As you can tell the slider position differs between them, but both still show
1
. When clickedok
the result passed for the second screenshot is:0.930346
or some decimal number below 1.It seems like the editbox field correctly gets "rounded" to the nearest number but the value sent when clicking ok, is the raw value that is not rounded. This then causes errors when the value returned is used in for-loops as limits.
Expected behavior:
I expected that when selecting using 0 decimals the value in the field I see is the one that is passed on when clicking "confirm".
Steps to reproduce:
Add the steps needed to reproduce the issue.
Where did the issue occur?
The text was updated successfully, but these errors were encountered: