modify dialog.AddSlider() in lua v2
Case number: | 699969-994093 |
Topic: | General |
Opened by: | phallicies |
Status: | Open |
Type: | Bug |
Opened on: | Tuesday, December 11, 2012 - 20:11 |
Last modified: | Thursday, December 13, 2018 - 09:50 |
with the slider i would appreciate it instead of only having increments of 1,.1,.01 etc i would like to be able to specify an increment. so if my slider was dialog.AddSlider("xxxx",4,2,10,0) so its from 0-10 and starts at 4 but i want it to go by increments of 2.
So maybe just add a last field to modify the delta and make it dialog.AddSlider("xxxx",4,2,10,1,D) where D is the increment you wish to go by between steps. so if D was .5 it would go from 2 to 2.5,3,3.5,4 and so on. that way it adds a little more control over the recipe. becuase sometimes you just dont need the numbers in between.
Status: Open » Closed |
Type: Suggestion » Bug |
Changed priority and filed under bug. Setting increment to a negative value (tried to get steps of 10s and 100s) crashes the client. The initial suggestion remains relevant though.
Status: Closed » Open |
argh. sorry for that
update. snippet code
local ask = dialog.CreateDialog("Test crash") ask.OK = dialog.AddSlider("OK", 1,0,10,-1) ask.Cancel = dialog.AddButton("Cancel", 0) dialog.Show(ask)
log tail
UNHANDLED EXCEPTION 1: no symbol (no line) (*13)
attached file is wine backtrace
I think this is still a problem. I was debugging a
recipe the other day containg a slider line like below:
dialog.AddSlider("iterations",50,1,1000,-1)
This line was to make a slider starting with the value
50 that would go from 1 to 1000 in increments of 10.
My recipe crashed Foldit multiple times, I assume because
of the -1 in the line above. I chose -1 because 0 is to
increment by 1, 1 is to increment by 0.1, 2 is to increment
by 0.01, and 3 is to increment by 0.001. I figured -1 would
increment by 10, -2 would increment by 100, and -3 would
increment by 1000.
Please change dialog.AddSlider so that it can handle
increments of 10 or more.
For more details, follow the link below:
http://foldit.wikia.com/wiki/Foldit_Lua_Function_dialog.Show
i should reclarify i want the D to be how much it steps between each or drag of the slider. so if you were going from 0-100 and the D was 5 it would skip by 5's from where ever you started.