Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetMouse problem.
#1
Ok, answer is prolly wery simple. Big Grin

I have GetMouse in my main loop of program.

Code:
IF MX > 0 AND ( MB ) AND 2 Then Call Menu

works fine, but i have this code below on my Menu Sub.
Code:
IF MX > 0 AND ( MB ) AND 2 Then GetOut = 1
and when GetOut = 1 then loop on sub ends and it returns to main loop of program.

This works fine, except it works way too fast. After pressing mouse button (2) at main loop, sub Menu just flashes and program goes back to main loop.

I did try to add sleep there to wait a while so i have time to get my finger out of button but it didnt help.
url=http://www.ascii-world.com]ASCII-World.com[/url]
Yeah, nick changed from lurah, but bullshit's are the same.
Reply
#2
you would probably want something like this at the start of the menu sub:

[syntax="qbasic"]do
getmouse mx, my, mb
loop until mb=0[/syntax]
/post]
Reply
#3
Yah, i first tryed to solve this one way wrong direction. Brains wakened just before you have posted here. Thx anyway Big Grin
url=http://www.ascii-world.com]ASCII-World.com[/url]
Yeah, nick changed from lurah, but bullshit's are the same.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)