Advertisement
Guest User

Untitled

a guest
Aug 10th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. int mouse_clickTime
  2.  
  3. init {
  4. // Init the Global
  5. mouse_clickTime == 0
  6. }
  7.  
  8. main {
  9.  
  10. if event_release(XB1_LT) {
  11. //On Button Up Set Timestamp
  12. mouse_clickTime = get_rtime()
  13. }
  14.  
  15.  
  16. //Check if we have pressed MB2 within 200ms
  17. if(mouse_clickTime >= 201 && get_val(XB1_RT)) {
  18. //Button Pressed and Time Passed is over 200ms
  19.  
  20. //Clear Global as to not Double Click again
  21. mouse_clickTime = 0
  22.  
  23. //Do Double Click
  24. ...
  25.  
  26. } else if(get_val(XB1_RT) && get_ptime(XB1_RT) <= 200) {
  27. //Button Pressed, but time since last click is not 200ms
  28. mouse_clickTime = 0
  29. //Do Hold Event
  30. ...
  31.  
  32. } else if(get_val(XB1_RT) {
  33. //Do Single Click
  34. }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement