(01-18-2025, 08:13 PM)bplus Wrote: 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:
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.
Hey @bplus, I took your concept and changed it a bit to use a TIMER to limit the checks on the mouse input since DELAY blocks the rest of the program execution. I updated the last post with this version:
Code: (Select All)
SUB domousestuff
DIM x, y
WHILE _MOUSEINPUT: WEND
IF _MOUSEBUTTON(1) AND TIMER - lastMouseEvent > .25 THEN
x = FIX(_MOUSEX \ FIX(maxx \ 16))
y = FIX(_MOUSEY \ FIX(maxy \ 16))
grid(x, y) = 1 - grid(x, y)
lastMouseEvent = TIMER
END IF
END SUB
(01-18-2025, 08:42 PM)bplus Wrote: Well Music Grid needs its own folder under my QBJS folder since we are adding files.
...
nope! The text file saved is loadable but the txt file won't make it through editors from copy/paste.
You all will have to wait to here today's master piece.
Actually you repeat something enough and almost anything starts to sound good, I think.
Yes, you'll have to upload it as file attachment to the post to share it with us.