Slider stepping issue.

BlitzMax Forums/BlitzMax Beginners Area/Slider stepping issue.

Thareh(Posted 2010) [#1]
Hi!
I'm creating a user interface, and I stumbled upon an annoying problem which I can't solve.



I just can't get the damn thing to go even up!
I want it to go even up no matter what size and steps you choose if that makes any sense :P
Anyone who can throw me a helping hand? :)
Thanks!


matibee(Posted 2010) [#2]
A simple order of operation issue I think...

SliderPos = ((MouseY() - Y)/StepSize)*StepSize



Thareh(Posted 2010) [#3]
Nah, Didn't work :(


matibee(Posted 2010) [#4]
You're right, it makes no difference. Sorry I didn't understand the problem. What do you mean by "even up".


Zeke(Posted 2010) [#5]

this is not perfect, but..


matibee(Posted 2010) [#6]
I guessed that was the issue Zeke and just came back to post almost the exact same code (even down to SliderPos being in the range 0 to SliderSteps :)


Thareh(Posted 2010) [#7]
Got it working now, Thanks guys :)
I just couldn't get my damn head around it!