Beispiel #1
0
        private void HandleFingerEvent(TouchFingerEvent e, PointerEventType type)
        {
            var newPosition = new Vector2(e.X, e.Y);
            var id          = GetFingerId(e.FingerId, type);

            PointerState.PointerInputEvents.Add(new PointerDeviceState.InputEvent {
                Type = type, Position = newPosition, Id = id
            });
        }
        public override bool touchPressed(TouchFingerEvent evt)
        {
            bool ret = BitesPINVOKE.InputListenerChain_touchPressed(swigCPtr, TouchFingerEvent.getCPtr(evt));

            if (BitesPINVOKE.SWIGPendingException.Pending)
            {
                throw BitesPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
        public virtual bool touchPressed(TouchFingerEvent evt)
        {
            bool ret = (SwigDerivedClassHasMethod("touchPressed", swigMethodTypes4) ? BitesPINVOKE.InputListener_touchPressedSwigExplicitInputListener(swigCPtr, TouchFingerEvent.getCPtr(evt)) : BitesPINVOKE.InputListener_touchPressed(swigCPtr, TouchFingerEvent.getCPtr(evt)));

            if (BitesPINVOKE.SWIGPendingException.Pending)
            {
                throw BitesPINVOKE.SWIGPendingException.Retrieve();
            }
            return(ret);
        }
Beispiel #4
0
 private void OnFingerReleaseEvent(TouchFingerEvent e)
 {
     HandleFingerEvent(e, PointerEventType.Released);
 }
Beispiel #5
0
 private void OnFingerPressEvent(TouchFingerEvent e)
 {
     HandleFingerEvent(e, PointerEventType.Pressed);
 }
Beispiel #6
0
 private void OnFingerMoveEvent(TouchFingerEvent e)
 {
     HandleFingerEvent(e, PointerEventType.Moved);
 }
Beispiel #7
0
 public override bool touchReleased(TouchFingerEvent evt)
 {
     return(false); // propgate further;
 }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(TouchFingerEvent obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }