help on query(no code)
BlitzMax Forums/BlitzMax Programming/help on query(no code)
| ||
hey everyone, I'd wondering if there is anything I can do to reset the value of mousez() id like it to reset to 0, if you STOP scrolling. any way to do this? maybe there needs to be a flushmouse request? :) |
| ||
i don't think you can. You can keep track with your own variable - every time mousez increases or decreases, modify your variable by the difference. Then just read from your variable instead of mousez, and set it to zero when you want. mymousez=mousez() while newmz=mousez() mymousez=mymousez+(newmz-oldmz) if i_want_to_reset mymousez=0 oldmz=newmz wend |
| ||
yeah, ok but the problem with that is, if you overscroll, and the mouseZ goes up(whether on purpose or not), you have to scroll mouseZ all the way back through what you scrolled + more to get it to the opposite side of the field meaning from being positive to negetive. using it for zooming. |
| ||
No you don't. Look carefully. If you use that algorithm mymousez will equal 0 when the mousez has not changed, therefore one click back would produce -1. |
| ||
oh thats right... thanks :) |