Hello @dbox
I am testing the new Play demo with new Save and Load (very nice!) and notice a slight problem getting those mouse clicks caught!
maybe this requires, once again, another application of a _limit or a pause to get clear of a click.
see if this works better for you:
I am not proud of _delay .25 a quick hacky way to pause for a bit to clear the mouse button but it is short and sweet because it gets the job done better IMO than the first mouse catcher routine.
I am testing the new Play demo with new Save and Load (very nice!) and notice a slight problem getting those mouse clicks caught!
maybe this requires, once again, another application of a _limit or a pause to get clear of a click.
Code: (Select All)
SUB domousestuff
DIM x, y
DO WHILE _MOUSEINPUT
IF _MOUSEBUTTON(1) THEN
x = FIX(_MOUSEX \ FIX(maxx \ 16))
y = FIX(_MOUSEY \ FIX(maxy \ 16))
grid(x, y) = 1 - grid(x, y)
END IF
LOOP
END SUB
see if this works better for you:
Code: (Select All)
Sub domousestuff
Dim x, y
While _MouseInput: Wend ' there we've polled the mouse we don't need to remain inside the loop unless we need mouse wheel
If _MouseButton(1) Then
_delay .25 ' wait for user to release button
x = Fix(_MouseX \ Fix(maxx \ 16))
y = Fix(_MouseY \ Fix(maxy \ 16))
grid(x, y) = 1 - grid(x, y)
End If
End Sub
I am not proud of _delay .25 a quick hacky way to pause for a bit to clear the mouse button but it is short and sweet because it gets the job done better IMO than the first mouse catcher routine.
b = b + ...