public void OnMouseDoubleClickHandler(MouseButtonEventData eventData) { if (eventData.Button == ButtonKey.Left) { Debug.Log("left double click!"); } }
public void OnMouseClickHandler(MouseButtonEventData eventData) { if (eventData.Button == ButtonKey.Left) { Debug.Log("left click!"); } else if (eventData.Button == ButtonKey.Middle) { Debug.Log("middle click!"); } else if (eventData.Button == ButtonKey.Right) { Debug.Log("right click!"); } //if (eventData.LeftButtonState == MouseButtonState.Pressed) //{ // Debug.Log( "left click!"); //} //else if (eventData.MiddleButtonState == MouseButtonState.Pressed) //{ // Debug.Log("middle click!"); //} //else if (eventData.RightButtonState == MouseButtonState.Pressed) //{ // Debug.Log("right click!"); //} eventData.MarkUse(this, true); }
internal virtual void OnMouseUp(MouseButtonEventData eventData) { if (BreakPass(eventData)) return; ExecuteEvents.Execute(this, eventData, ExecuteEvents.MouseUpHandler); Parent.OnMouseUp(eventData); }