Example #1
0
 void IPointerUpHandler.OnPointerUp(PointerEventData eventData)
 {
     if (!IsMute)
     {
         PointerUp?.Invoke();
     }
 }
Example #2
0
 public void InvokePointerUp(Vector2 pointerPosition)
 {
     if (PointerUp != null)
     {
         PointerUp.Invoke(this, new PointerGraphicalElementEventArgs(pointerPosition));
     }
 }
Example #3
0
    public void OnPointerUp(PointerEventData eventData)
    {
        _inputVector = Vector2.zero;
        _stick.Stick.anchoredPosition = Vector2.zero;
        _phone.VibrateMini();

        PointerUp?.Invoke();
    }
Example #4
0
    public void OnPointerUp(PointerEventData eventData)
    {
        if (bricks.Count > 0)
        {
            PointerUp.Invoke(this);
        }

        StartCoroutine(DoLocalMove(cachedPosition));
        StartCoroutine(DoLocalScale(cachedScale));
    }
Example #5
0
        private void OnPointerUp(EventSystemData Data)
        {
            if (!IsDrag_)
            {
                return;
            }

            PointerUp?.Invoke(Data.Location);
            CheckLongPressed();
            IsDrag_           = false;
            PreviousDownTime_ = 0;
        }
Example #6
0
 public void OnPointerUp(PointerEventData eventData)
 {
     if (_pointerDownCalled == false)
     {
         return;
     }
     if (preventCameraControl && _cameraControl)
     {
         _cameraControl.NoCtrlCondition = _noControlFunctionCached;
     }
     _pointerDownCalled = false;
     PointerUp?.Invoke(eventData);
 }
Example #7
0
        private void Element_MouseUp(object sender, MouseButtonEventArgs args)
        {
            var id       = GetMouseButton(args);
            var buttons  = GetMouseButtons(args);
            var position = GetPosition(args);

            if (FirstMouseButton == id)
            {
                FirstMouseButton = 0;
            }

            PointerUp?.Invoke(this, new PointerEventArgs(CurrentTime, position, PointerId.FromMouse(id), buttons));
        }
Example #8
0
 private void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         tapPosition = Input.mousePosition;
     }
     if (Input.GetMouseButton(0))
     {
         DirectionChanged?.Invoke(Input.mousePosition - tapPosition);
     }
     if (Input.GetMouseButtonUp(0))
     {
         PointerUp?.Invoke();
     }
 }
Example #9
0
        private void UpdatePointerState(bool state)
        {
            if (IsPointerDown == state)
            {
                return;
            }

            IsPointerDown = state;
            PointerEventData ev = new PointerEventData(null);

            if (IsPointerDown)
            {
                if (_driveColliders)
                {
                    foreach (IPointerDownHandler down in _downHandlers)
                    {
                        down.OnPointerDown(ev);
                    }
                    foreach (IMouseDownHandler down in _mouseDownHandlers)
                    {
                        down.OnMouseDown();
                    }
                    //TODO - does Click mean it needs both a down + up?
                    foreach (IPointerClickHandler click in _clickHandlers)
                    {
                        click.OnPointerClick(ev);
                    }
                }
                PointerDown.Invoke(this, ev);
            }
            else
            {
                if (_driveColliders)
                {
                    foreach (IPointerUpHandler up in _upHandlers)
                    {
                        up.OnPointerUp(ev);
                    }
                    foreach (IMouseUpHandler up in _mouseUpHandlers)
                    {
                        up.OnMouseUp();
                    }
                }
                PointerUp.Invoke(this, ev);
            }
        }
        public void ReadTouch()
        {
            var touchPosition = _touchDevice.ReadTouchPoints();
            int pressure      = _touchDevice.Pressure;

            if (pressure > 5)
            {
                if (!_penPressed)
                {
                    _penPressed = true;
                    var _ = _dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                    {
                        PointerDown?.Invoke(this, new PointerEventArgs()
                        {
                            Position = touchPosition, Pressure = pressure
                        });
                    });
                }
                else
                {
                    var _ = _dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                    {
                        PointerMoved?.Invoke(this, new PointerEventArgs()
                        {
                            Position = touchPosition, Pressure = pressure
                        });
                    });
                }
            }
            else if (pressure < 2 && _penPressed == true)
            {
                _penPressed = false;
                var _ = _dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
                {
                    PointerUp?.Invoke(this, new PointerEventArgs()
                    {
                        Position = touchPosition
                    });
                });
            }
        }
Example #11
0
 public virtual void OnPointerUp(PointerEventData eventData)
 {
     _pointersCount--;
     PointerUp.SafeInvoke(eventData);
 }
Example #12
0
 public void OnPointerUp(PointerEventData eventData)
 {
     IsDragging = false;
     PointerUp.SafeInvoke();
 }
 public virtual void OnPointerUp(PointerEventData eventData)
 {
     m_IsPressed = false;
     PointerUp?.Invoke(this, eventData);
     ForwardToParents <IPointerUpHandler>((parent) => parent.OnPointerUp(eventData));
 }
Example #14
0
 private void TriggerPointerUp()
 {
     PointerUp?.Invoke(this);
 }
Example #15
0
 public void OnPointerUp(PointerEventData eventData)
 {
     PointerUp?.Invoke(eventData.position);
 }
Example #16
0
        public void OnPointerUp(PointerEventData eventData)
        {
            Debug.Log($"On pointer up: {_buttonIndex}");

            PointerUp?.Invoke(eventData, this);
        }
Example #17
0
 public void OnPointerUp(PointerEventData eventData)
 {
     pointerDown = false;
     PointerUp?.Invoke();
 }
Example #18
0
 protected virtual void OnPointerUp(object sender, PointerButtonEventArgs e)
 {
     PointerUp?.Invoke(sender, e);
 }
Example #19
0
        public void OnPointerUp(PointerEventData eventData)
        {
            IsUsing = false;

            PointerUp?.Invoke();
        }
Example #20
0
 public virtual void OnPointerUp(PointerEventData eventData)
 {
     PointerUp.SafeInvoke(eventData);
 }
Example #21
0
 public override void OnPointerUp(PointerEventData eventData)
 {
     base.OnPointerUp(eventData);
     PointerUp?.Invoke();
 }