// Token: 0x060043E1 RID: 17377 RVA: 0x000FB920 File Offset: 0x000F9B20
 internal override void OnDragStart(global::dfDragEventArgs args)
 {
     base.OnDragStart(args);
     if (args.Used)
     {
         this.isMouseDown = false;
     }
 }
 // Token: 0x060041DF RID: 16863 RVA: 0x000F22AC File Offset: 0x000F04AC
 public bool Process(global::dfInputManager.TouchInputManager.TouchRaycast info)
 {
     if (this.IsDragging)
     {
         if (!this.capture.Contains(info.FingerID))
         {
             return(false);
         }
         if (info.Phase == 2)
         {
             return(true);
         }
         if (info.Phase == 4)
         {
             this.control.OnDragEnd(new global::dfDragEventArgs(this.control, global::dfDragDropState.Cancelled, this.dragData, info.ray, info.position));
             this.dragState = global::dfDragDropState.None;
             this.touches.Clear();
             this.capture.Clear();
             return(true);
         }
         if (info.Phase != 3)
         {
             return(true);
         }
         if (info.control == null || info.control == this.control)
         {
             this.control.OnDragEnd(new global::dfDragEventArgs(this.control, global::dfDragDropState.CancelledNoTarget, this.dragData, info.ray, info.position));
             this.dragState = global::dfDragDropState.None;
             this.touches.Clear();
             this.capture.Clear();
             return(true);
         }
         global::dfDragEventArgs dfDragEventArgs = new global::dfDragEventArgs(info.control, global::dfDragDropState.Dragging, this.dragData, info.ray, info.position);
         info.control.OnDragDrop(dfDragEventArgs);
         if (!dfDragEventArgs.Used || dfDragEventArgs.State != global::dfDragDropState.Dropped)
         {
             dfDragEventArgs.State = global::dfDragDropState.Cancelled;
         }
         global::dfDragEventArgs dfDragEventArgs2 = new global::dfDragEventArgs(this.control, dfDragEventArgs.State, this.dragData, info.ray, info.position);
         dfDragEventArgs2.Target = info.control;
         this.control.OnDragEnd(dfDragEventArgs2);
         this.dragState = global::dfDragDropState.None;
         this.touches.Clear();
         this.capture.Clear();
         return(true);
     }
     else if (!this.touches.ContainsKey(info.FingerID))
     {
         if (info.control != this.control)
         {
             return(false);
         }
         this.touches[info.FingerID] = info;
         if (this.touches.Count == 1)
         {
             this.control.OnMouseEnter(info);
             if (info.Phase == null)
             {
                 this.capture.Add(info.FingerID);
                 this.control.OnMouseDown(info);
             }
             return(true);
         }
         if (info.Phase == null)
         {
             this.control.OnMouseUp(info);
             this.control.OnMouseLeave(info);
             List <Touch>             activeTouches = this.getActiveTouches();
             global::dfTouchEventArgs args          = new global::dfTouchEventArgs(this.control, activeTouches, info.ray);
             this.control.OnMultiTouch(args);
         }
         return(true);
     }
     else
     {
         if (info.Phase == 4 || info.Phase == 3)
         {
             global::dfInputManager.TouchInputManager.TouchRaycast touch = this.touches[info.FingerID];
             this.touches.Remove(info.FingerID);
             if (this.touches.Count == 0)
             {
                 if (this.capture.Contains(info.FingerID))
                 {
                     if (this.canFireClickEvent(info, touch) && info.control == this.control)
                     {
                         if (info.touch.tapCount > 1)
                         {
                             this.control.OnDoubleClick(info);
                         }
                         else
                         {
                             this.control.OnClick(info);
                         }
                     }
                     this.control.OnMouseUp(info);
                 }
                 this.control.OnMouseLeave(info);
                 this.capture.Remove(info.FingerID);
                 return(true);
             }
             this.capture.Remove(info.FingerID);
             if (this.touches.Count == 1)
             {
                 global::dfTouchEventArgs args2 = this.touches.Values.First <global::dfInputManager.TouchInputManager.TouchRaycast>();
                 this.control.OnMouseEnter(args2);
                 this.control.OnMouseDown(args2);
                 return(true);
             }
         }
         if (this.touches.Count > 1)
         {
             List <Touch>             activeTouches2 = this.getActiveTouches();
             global::dfTouchEventArgs args3          = new global::dfTouchEventArgs(this.control, activeTouches2, info.ray);
             this.control.OnMultiTouch(args3);
             return(true);
         }
         if (!this.IsDragging && info.Phase == 2)
         {
             if (info.control == this.control)
             {
                 this.control.OnMouseHover(info);
                 return(true);
             }
             return(false);
         }
         else
         {
             bool flag = this.capture.Contains(info.FingerID) && this.dragState == global::dfDragDropState.None && info.Phase == 1;
             if (flag)
             {
                 global::dfDragEventArgs dfDragEventArgs3 = info;
                 this.control.OnDragStart(dfDragEventArgs3);
                 if (dfDragEventArgs3.State == global::dfDragDropState.Dragging && dfDragEventArgs3.Used)
                 {
                     this.dragState = global::dfDragDropState.Dragging;
                     this.dragData  = dfDragEventArgs3.Data;
                     return(true);
                 }
                 this.dragState = global::dfDragDropState.Denied;
             }
             if (info.control != this.control && !this.capture.Contains(info.FingerID))
             {
                 this.control.OnMouseLeave(info);
                 this.touches.Remove(info.FingerID);
                 return(true);
             }
             this.control.OnMouseMove(info);
             return(true);
         }
     }
 }
Пример #3
0
 private void DragEventProxy(global::dfControl control, global::dfDragEventArgs dragEvent)
 {
     this.callProxyEventHandler();
 }
 // Token: 0x06004781 RID: 18305 RVA: 0x0010E680 File Offset: 0x0010C880
 internal override void OnDragEnd(global::dfDragEventArgs args)
 {
     base.OnDragEnd(args);
     this.isMouseDown = false;
 }