예제 #1
0
 // 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);
     }
 }
예제 #2
0
        // 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);
            }
        }