![]() |
|
Who wants to PLAY? - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: QBJS, BAM, and Other BASICs (https://qb64phoenix.com/forum/forumdisplay.php?fid=50) +--- Thread: Who wants to PLAY? (/showthread.php?tid=3384) Pages:
1
2
|
RE: Who wants to PLAY? - dbox - 01-18-2025 (01-18-2025, 08:13 PM)bplus Wrote: Hello @dbox 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(01-18-2025, 08:42 PM)bplus Wrote: Well Music Grid needs its own folder under my QBJS folder since we are adding files. Yes, you'll have to upload it as file attachment to the post to share it with us. RE: Who wants to PLAY? - bplus - 01-18-2025 There was only a delay if Mousebutton is detected, not really that disruptive to the composer? Now with Timer involved, you might run into the Midnight problem eg, last mouse was a second before midnight = big number next timer is the start of new day = small st small - big = smaller! OR make it a rule not to feed the Mogai and compose music after midnight! ![]() (but logically that means never do either) RE: Who wants to PLAY? - dbox - 01-18-2025 One missed click at midnight is a risk I’m willing to take for smoother performance overall
RE: Who wants to PLAY? - dbox - 01-19-2025 Just for grins, here is another update with a midnight safe timer. This demonstrates the fact that you can actually override default keywords in your program with your own implementation in QBJS. (See line 125). RE: Who wants to PLAY? - bplus - 01-19-2025 This might do it too: Abs(TIMER - lastMouseEvent) > .25 RE: Who wants to PLAY? - dbox - 01-19-2025 (01-19-2025, 06:49 AM)bplus Wrote: This might do it too:I like that even better. RE: Who wants to PLAY? - SMcNeill - 01-20-2025 My way of doing this would be: Code: (Select All) Sub domousestuffOnly count a mouseclick down if the mouse was up before clicking RE: Who wants to PLAY? - dbox - 01-21-2025 (01-20-2025, 11:59 PM)SMcNeill Wrote: My way of doing this would be… Yep, that’s a good option too. |