LuaV22 slider misrepresents its value

Case number:845833-994312
Topic:Game: Display
Opened by:truestone
Opened on:Sunday, January 13, 2013 - 12:42
Last modified:Monday, January 14, 2013 - 19:27

In below code, a slider initialized to a particular value shows a different value.

d = dialog.CreateDialog("test")
value = 1.7
d.s = dialog.AddSlider("slider", value, 0, 5, 1)
value = d.s.value
until value == 0

The slider should be at 1.7 but shows 1.6. Slide it to 3.4 and close the dialog. The value printed is 3.4 but when fed back to the slider, it drops to 3.3.

(Sun, 01/13/2013 - 12:42  |  1 comment)

tamirh's picture
User offline. Last seen 7 years 14 weeks ago. Offline
Joined: 05/11/2012

Looks like it was just rounding down always instead of rounding to the closest value. I've fixed it, it should be out in the next devprev.

As a workaround before the fix goes out, just add a very small number to the value you are setting. So in your example, 1.7 would become 1.7001


Developed by: UW Center for Game Science, UW Institute for Protein Design, Northeastern University, Vanderbilt University Meiler Lab, UC Davis
Supported by: DARPA, NSF, NIH, HHMI, Amazon, Microsoft, Adobe, RosettaCommons