示例#1
0
 public void OnPointerClick(PointerEventData eventData)
 {
     if (eventData.pointerId == -1)
     {
         OnLeftClick.Invoke();
         if (isToggle && ToggleClick == toggleClick.left)
         {
             Toggle();
         }
     }
     else if (eventData.pointerId == -2)
     {
         OnRightClick.Invoke();
         if (isToggle && ToggleClick == toggleClick.right)
         {
             Toggle();
         }
     }
     else if (eventData.pointerId == -3)
     {
         OnMiddleClick.Invoke();
         if (isToggle && ToggleClick == toggleClick.middle)
         {
             Toggle();
         }
     }
     img.color = press;
     tweenToNormal();
 }
示例#2
0
 public virtual void MiddleClick(UIMouseEvent evt)
 {
     OnMiddleClick?.Invoke(evt, this);
     Parent?.MiddleClick(evt);
 }
示例#3
0
 public virtual void MiddleClick(UIMouseEventArgs e)
 {
     OnMiddleClick?.Invoke(this, e);
     Parent?.MiddleClick(e);
 }
示例#4
0
 internal void CallMiddleClick()
 {
     OnMiddleClick?.Invoke();
 }