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(); }
public virtual void MiddleClick(UIMouseEvent evt) { OnMiddleClick?.Invoke(evt, this); Parent?.MiddleClick(evt); }
public virtual void MiddleClick(UIMouseEventArgs e) { OnMiddleClick?.Invoke(this, e); Parent?.MiddleClick(e); }
internal void CallMiddleClick() { OnMiddleClick?.Invoke(); }