Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int mouse_clickTime
- init {
- // Init the Global
- mouse_clickTime == 0
- }
- main {
- if event_release(XB1_LT) {
- //On Button Up Set Timestamp
- mouse_clickTime = get_rtime()
- }
- //Check if we have pressed MB2 within 200ms
- if(mouse_clickTime >= 201 && get_val(XB1_RT)) {
- //Button Pressed and Time Passed is over 200ms
- //Clear Global as to not Double Click again
- mouse_clickTime = 0
- //Do Double Click
- ...
- } else if(get_val(XB1_RT) && get_ptime(XB1_RT) <= 200) {
- //Button Pressed, but time since last click is not 200ms
- mouse_clickTime = 0
- //Do Hold Event
- ...
- } else if(get_val(XB1_RT) {
- //Do Single Click
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement