public void OnPointerClick(PointerEventData eventData) { if (eventData.clickCount == 2) { onDoubleClick.Invoke(); } }
void DoubleClick() { if (onDoubleClick != null) { onDoubleClick.Invoke(); } ResetClickTime(); }
public void OnPointerDown(PointerEventData eventData) { // doubleClickEvent.is touchDownEvent.Invoke(); if (cameraCenter != null) { if (Input.touches.Length == 2) { zConutOffset = 0; disVec2 = new Vector2(Input.touches[0].position.x - Input.touches[1].position.x, Input.touches[0].position.y - Input.touches[1].position.y).magnitude; disVec2_first = disVec2; zCountStart = cameraCenter.currentCamera.Zcount; inZoom = true; inTouch = false; } else if (Input.touches.Length == 1) { xConutOffset = 0; yConutOffset = 0; firstPosition = Input.touches[0].position; inZoom = false; inTouch = true; } flip = !flip; if (flip) { aClickPosition = eventData.position; mTimeA = Time.time; } else { bClickPosition = eventData.position; mTimeB = Time.time; } if (Mathf.Abs(mTimeA - mTimeB) < 0.3f && Vector2.Distance(aClickPosition, bClickPosition) < 30) { doubleClickEvent.Invoke(eventData); cameraCenter.currentCamera.DoubleClick(eventData.position); } #if UNITY_EDITOR || UNITY_STANDALONE_WIN xConutOffset = 0; yConutOffset = 0; firstPosition = eventData.position; #endif cameraCenter.currentCamera.TouchDown(firstPosition); } }
private void mouseClicked() { if (lastClickTime <= 0) { lastClickTime = MaxTimeBetween; } else { lastClickTime = 0; OnDoubleClick.Invoke(); } }
public void DoubleClickOpen() { IsSelected = !IsSelected; if (IsFolder) { FileClickedEvent?.Invoke(this, fileClickedArg); } else { DoubleClickEvent?.Invoke(this, fileClickedArg); } }
public static void InvokeDoubleClickEvent(MouseClickEventArgs args) { DoubleClickEvent?.Invoke(args); }
public void DoubleClick(object sender, MouseButtonEventArgs args) { DoubleClickEvent?.Invoke(sender, args); }