// Token: 0x0600026D RID: 621 RVA: 0x0001F3B8 File Offset: 0x0001D5B8 private void FakeTouches() { CusPointerInputModule.MouseState mousePointerEventData = this.GetMousePointerEventData(); CusPointerInputModule.MouseButtonEventData eventData = mousePointerEventData.GetButtonState(PointerEventData.InputButton.Left, 0).eventData; if (eventData.PressedThisFrame()) { eventData.buttonData.delta = Vector2.zero; } this.ProcessTouchPress(eventData.buttonData, eventData.PressedThisFrame(), eventData.ReleasedThisFrame()); if (Input.GetMouseButton(0)) { this.ProcessMove(eventData.buttonData); this.ProcessDrag(eventData.buttonData); } }
// Token: 0x06000261 RID: 609 RVA: 0x0001EDB8 File Offset: 0x0001CFB8 private void ProcessMouseEvent() { CusPointerInputModule.MouseState mousePointerEventData = this.GetMousePointerEventData(); bool pressed = mousePointerEventData.AnyPressesThisFrame(); bool released = mousePointerEventData.AnyReleasesThisFrame(); CusPointerInputModule.MouseButtonEventData eventData = mousePointerEventData.GetButtonState(PointerEventData.InputButton.Left, 0).eventData; if (!CusStandaloneInputModule.UseMouse(pressed, released, eventData.buttonData)) { return; } this.ProcessMousePress(eventData); this.ProcessMove(eventData.buttonData); this.ProcessDrag(eventData.buttonData); this.ProcessMousePress(mousePointerEventData.GetButtonState(PointerEventData.InputButton.Right, 0).eventData); this.ProcessDrag(mousePointerEventData.GetButtonState(PointerEventData.InputButton.Right, 0).eventData.buttonData); this.ProcessMousePress(mousePointerEventData.GetButtonState(PointerEventData.InputButton.Middle, 0).eventData); this.ProcessDrag(mousePointerEventData.GetButtonState(PointerEventData.InputButton.Middle, 0).eventData.buttonData); if (!Mathf.Approximately(eventData.buttonData.scrollDelta.sqrMagnitude, 0f)) { GameObject eventHandler = ExecuteEvents.GetEventHandler <IScrollHandler>(eventData.buttonData.pointerCurrentRaycast.gameObject); ExecuteEvents.ExecuteHierarchy <IScrollHandler>(eventHandler, eventData.buttonData, ExecuteEvents.scrollHandler); } }
// Token: 0x06000264 RID: 612 RVA: 0x0001EF38 File Offset: 0x0001D138 private void ProcessMousePress(CusPointerInputModule.MouseButtonEventData data) { PointerEventData buttonData = data.buttonData; GameObject gameObject = buttonData.pointerCurrentRaycast.gameObject; if (data.PressedThisFrame()) { if (!UIHintMask.bPassThrough) { RaycastResult?maskRay = this.MaskRay; if (maskRay != null && gameObject != null && gameObject.name[0] != '~') { CusPointerInputModule.MouseButtonEventData eventData = this.m_MaskMouseState.GetButtonState(PointerEventData.InputButton.Left, 0).eventData; PointerEventData buttonData2 = eventData.buttonData; if (buttonData2.pointerCurrentRaycast.gameObject.activeInHierarchy) { return; } } } buttonData.eligibleForClick = true; buttonData.delta = Vector2.zero; buttonData.dragging = false; buttonData.useDragThreshold = true; buttonData.pressPosition = buttonData.position; buttonData.pointerPressRaycast = buttonData.pointerCurrentRaycast; base.DeselectIfSelectionChanged(gameObject, buttonData); GameObject gameObject2 = ExecuteEvents.ExecuteHierarchy <IPointerDownHandler>(gameObject, buttonData, ExecuteEvents.pointerDownHandler); if (gameObject2 == null) { gameObject2 = ExecuteEvents.GetEventHandler <IPointerClickHandler>(gameObject); } float unscaledTime = Time.unscaledTime; if (gameObject2 == buttonData.lastPress) { float num = unscaledTime - buttonData.clickTime; if (num < 0.3f) { buttonData.clickCount++; } else { buttonData.clickCount = 1; } buttonData.clickTime = unscaledTime; } else { buttonData.clickCount = 1; } buttonData.pointerPress = gameObject2; buttonData.rawPointerPress = gameObject; buttonData.clickTime = unscaledTime; buttonData.pointerDrag = ExecuteEvents.GetEventHandler <IDragHandler>(gameObject); if (buttonData.pointerDrag != null) { ExecuteEvents.Execute <IInitializePotentialDragHandler>(buttonData.pointerDrag, buttonData, ExecuteEvents.initializePotentialDrag); } } if (data.ReleasedThisFrame()) { RaycastResult?maskRay2 = this.MaskRay; if (maskRay2 != null) { CusPointerInputModule.MouseButtonEventData eventData2 = this.m_MaskMouseState.GetButtonState(PointerEventData.InputButton.Left, 0).eventData; PointerEventData buttonData3 = eventData2.buttonData; if (buttonData3.pointerCurrentRaycast.gameObject.activeInHierarchy) { ExecuteEvents.Execute <IPointerClickHandler>(buttonData3.pointerCurrentRaycast.gameObject, buttonData3, ExecuteEvents.pointerClickHandler); if (!UIHintMask.bPassThrough && gameObject != null && gameObject.name[0] != '~') { buttonData.eligibleForClick = false; buttonData.pointerPress = null; buttonData.rawPointerPress = null; buttonData.dragging = false; buttonData.pointerDrag = null; if (gameObject != buttonData.pointerEnter) { base.HandlePointerExitAndEnter(buttonData, null); base.HandlePointerExitAndEnter(buttonData, gameObject); } return; } } } ExecuteEvents.Execute <IPointerUpHandler>(buttonData.pointerPress, buttonData, ExecuteEvents.pointerUpHandler); GameObject eventHandler = ExecuteEvents.GetEventHandler <IPointerClickHandler>(gameObject); if (buttonData.pointerPress == eventHandler && buttonData.eligibleForClick) { ExecuteEvents.Execute <IPointerClickHandler>(buttonData.pointerPress, buttonData, ExecuteEvents.pointerClickHandler); } else if (buttonData.pointerDrag != null) { ExecuteEvents.ExecuteHierarchy <IDropHandler>(gameObject, buttonData, ExecuteEvents.dropHandler); } buttonData.eligibleForClick = false; buttonData.pointerPress = null; buttonData.rawPointerPress = null; if (buttonData.pointerDrag != null && buttonData.dragging) { ExecuteEvents.Execute <IEndDragHandler>(buttonData.pointerDrag, buttonData, ExecuteEvents.endDragHandler); } buttonData.dragging = false; buttonData.pointerDrag = null; if (gameObject != buttonData.pointerEnter) { base.HandlePointerExitAndEnter(buttonData, null); base.HandlePointerExitAndEnter(buttonData, gameObject); } } }