Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What do you guys like to use for mouse mapping?
#5
Arrays are how I go for complex mouse mapping.  Just store the upper-left and lower-right point of the box where the mouse click is valid.  Most times however, I just assign areas which can be calculated easily with a little math for my mouse areas.

For i = 0 to 5 '5 boxes to click in as a menu
   line (100,i * 100 + 100) - step (400,100), kolor(i), BF 'this is one boxed area
Next  ' this little bit draws the boxes

While _MouseInput: Wend
 If _MouseX > 100 and _MouseX < 500 Then 'it's within the left-right box area
     boxclicked = INT((_MouseY - 100) / 100) 'this tells us if we clicked inside the proper Y area for each designated box.
 End IF

That's all there is to it!  Quick to create, even quicker to check for coordinates.
Reply


Messages In This Thread
RE: What do you guys like to use for mouse mapping? - by SMcNeill - 12-21-2024, 03:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Polynomial Regression + Mouse Interpolation ' QB64-PE Example ajax12 11 1,210 10-30-2025, 08:23 PM
Last Post: Pete
  Aloha from Maui guys. Cobalt 18 2,971 01-20-2025, 07:33 PM
Last Post: Pete
  Hey guys, riddle me this... Pete 8 1,331 01-01-2025, 02:23 AM
Last Post: Pete
  Clearing the mouse and keyboard buffers Donald Foster 1 599 03-09-2024, 07:47 AM
Last Post: a740g
  IDE' mouse problem with 3.4.1 on macOS Fifi 8 1,872 01-13-2023, 01:06 PM
Last Post: Fifi

Forum Jump:


Users browsing this thread: 1 Guest(s)