public virtual void touchesBegan(object sender, TouchpadEventArgs arg) { if (!Global.UseTPforControls[deviceNum]) { Array.Clear(trackballXBuffer, 0, TRACKBALL_BUFFER_LEN); Array.Clear(trackballXBuffer, 0, TRACKBALL_BUFFER_LEN); trackballXVel = 0.0; trackballYVel = 0.0; trackballActive = false; trackballBufferTail = 0; trackballBufferHead = 0; trackballDXRemain = 0.0; trackballDYRemain = 0.0; cursor.touchesBegan(arg); wheel.touchesBegan(arg); } pastTime = arg.timeStamp; firstTouch.populate(arg.touches[0].hwX, arg.touches[0].hwY, arg.touches[0].touchID, arg.touches[0].previousTouch); if (Global.getDoubleTap(deviceNum)) { DateTime test = arg.timeStamp; if (test <= (firstTap + TimeSpan.FromMilliseconds((double)Global.TapSensitivity[deviceNum] * 1.5)) && !arg.touchButtonPressed) { secondtouchbegin = true; } } s = dev.getCurrentStateRef(); synthesizeMouseButtons(); }
public virtual void touchesBegan(object sender, TouchpadEventArgs arg) { if (!Global.UseTPforControls[deviceNum]) { cursor.touchesBegan(arg); wheel.touchesBegan(arg); } pastTime = arg.timeStamp; firstTouch = arg.touches[0]; if (Global.DoubleTap[deviceNum]) { DateTime test = arg.timeStamp; if (test <= (firstTap + TimeSpan.FromMilliseconds((double)Global.TapSensitivity[deviceNum] * 1.5)) && !arg.touchButtonPressed) { secondtouchbegin = true; } } dev.getCurrentState(s); synthesizeMouseButtons(); }