Exemplo n.º 1
0
        private bool IsHighPriorityGestureActiving(CocoGestureType gestureType)
        {
            CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType);

            if (data == null)
            {
                return(false);
            }

            return((data.HighPriorityGestureTypes & _activeGestureTypes) != 0);
        }
Exemplo n.º 2
0
        private void CancelLowPriorityGestureProcess(CocoGestureType gestureType)
        {
            CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType);

            if (data == null)
            {
                return;
            }

            if (data.LowPriorityGestureTypes != null)
            {
                data.LowPriorityGestureTypes.ForEach(CancelGestureDataProcess);
            }
        }
Exemplo n.º 3
0
        private void CancelGestureDataProcess(CocoGestureType gestureType)
        {
            if (IsGestureProcessing(gestureType))
            {
                //Debug.LogErrorFormat ("{0}: {1}->CancelGestureDataProcess: {2} cancelled", Time.time, GetType ().Name, gestureType);
                EndGestureProcess(gestureType);
                CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType);
                if (data != null)
                {
                    data.CancelGestureProcess();
                }
            }

            CancelLowPriorityGestureProcess(gestureType);
        }
Exemplo n.º 4
0
        private bool ProcessGestureData(CocoGestureType gestureType, object gesture)
        {
            if (!IsGestureProcessing(gestureType))
            {
                return(false);
            }

            CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType);

            if (data == null)
            {
                return(false);
            }

            data.ProcessGesture(gesture);
            return(true);
        }
Exemplo n.º 5
0
        public void SetGesturePriorities(CocoGestureType gestureType, CocoGestureType[] lowPriorityGestureTypes)
        {
            CocoTouchPriorityConfigData data = _gestureConfigDataDic.GetValue(gestureType);

            if (data == null)
            {
                return;
            }

            data.LowPriorityGestureTypes = lowPriorityGestureTypes;

            lowPriorityGestureTypes.ForEach(lowPriorityGestureType => {
                CocoTouchPriorityConfigData lowPriorityPriorityData = _gestureConfigDataDic.GetValue(lowPriorityGestureType);
                if (lowPriorityPriorityData == null)
                {
                    return;
                }

                lowPriorityPriorityData.HighPriorityGestureTypes |= gestureType;
            });
        }