November 25, 2020, 04:30:17 AM

Author Topic: [bb] Mouse Released, or Mouse Up by Rob [ 1+ years ago ]  (Read 575 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] Mouse Released, or Mouse Up by Rob [ 1+ years ago ]
« on: June 29, 2017, 12:28:41 AM »
Title : Mouse Released, or Mouse Up
Author : Rob
Posted : 1+ years ago

Description : determine if user has let go of mouse button easily.

Code :
Code: BlitzBasic
  1. ; For inner - how to do a "mouse released" or "mouse up"
  2. ; By Rob Cummings (rob@redflame net)
  3.  
  4. Global oldbutton,newbutton
  5.  
  6. While Not KeyHit(1)
  7.         If MouseUp() Then Print "MOUSEUP!"
  8.         UpdateMouse()
  9. Wend
  10. End
  11.  
  12. Function updatemouse()
  13.         oldbutton=newbutton
  14.         newbutton=MouseDown(1)
  15. End Function
  16.  
  17. Function MouseUp()
  18.         If oldbutton=1 And newbutton=0 Return 1
  19. End Function


Comments : none...

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal