Make dialog.AddLogSlider() similar to dialog.AddSlider()

Case number:845813-998413
Topic:Game: Tools
Opened by:jeff101
Status:Open
Type:Suggestion
Opened on:Sunday, August 31, 2014 - 23:59
Last modified:Sunday, August 31, 2014 - 23:59

Would it be possible to make a function like dialog.AddSlider()
(see http://foldit.wikia.com/wiki/Foldit_Lua_Functions#dialog.AddSlider and
http://foldit.wikia.com/wiki/Foldit_Lua_Function_dialog.AddSlider for details)
that instead gives logarithmic/power-law/exponential values?

It could be like below:

dialog.AddLogSlider(string label, number value, number minimum, number maximum, number uniquevalues)

It would output a number from minimum to maximum. The default output would be value.
The allowed outputs would be from minimum to maximum and would rise exponentially
between these limits. There would be only uniquevalues different outputs possible.

For example,

dialog.AddLogSlider('power of 10', 1, 0.001, 1000, 7)

would output the default value of 1.
If you moved the slider to the far left, it would output 0.001.
If you moved the slider to the far right, it would output 1000.
The 7 possible equally-spaced slider positions would
output the values 0.001 0.01 0.1 1 10 100 or 1000
going from left to right on the slider.

Similarly,

dialog.AddLogSlider('power of 2', 32, 1, 1024, 11)

would output the default value of 32.
The 11 possible equally-spaced slider positions would
output the values 1 2 4 8 16 32 64 128 256 512 or 1024
going from left to right on the slider.

Thanks!

(Sun, 08/31/2014 - 23:59  |  0 comments)


Sitemap

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