11-21-2022, 11:54 PM
(11-21-2022, 11:27 PM)SMcNeill Wrote: Attempting to process other code inside that mouseinput loop is just asking for trouble. Our wiki examples work for what they're showing, but what they're showing is about the worst possible structure I could imagine for use with _MOUSEINPUT. Honestly, they must've just written into the wiki when _MOUSEINPUT was first added into the wiki and nobody knew much about it.. As it stands now, those examples need an overhaul to show how to actually use them properly.In almost all my programs using this function, I used it in the wrong way you described, which was the main reason why I was often frustrated. This included trying to fix that "Lights Out" game somewhere in bplus' forum, wanted mouse input instead of keyboard. I spent at least an hour trying to fix it for accuracy of left mouse button presses but was less successful trying to block the stream of messages, so it was possible to hold the button and move the mouse cursor.
Maybe I could show what I did with the source code of "Lights Out" but I limited it to 4, 5 or 6 squares across and down LOL.
I think the "_MOUSEINPUT" explanations in the Wiki, and the related functions, kept screaming to call that function or mouse events aren't detected by the QB64(PE) user program. It was interpreted by many people (including me) to call it to get every event and not let a single event get away...