IEnumerator DoubleCheckComment(Vector2 pos) { yield return(new WaitForSeconds(0.2f)); if (Time.time - lastClickComment >= 0.2f) { MouseToast.MakeToastFixed(1f, "Double click to edit", pos); } }
private void OnClick(BaseEventData arg0) { PointerEventData ev = arg0 as PointerEventData; if (ev == null) { return; } if (ev.button == PointerEventData.InputButton.Left) { if (OutputVisual.status == OutputVisual.LINKING) { //linking if (OutputVisual.linkInitiator.host != host) { Disconnect(); OutputVisual.CompleteLink(this); } } else { //not linking if (ev.clickCount == 2) { Disconnect(); } } } else if (ev.button == PointerEventData.InputButton.Right) { stay = !stay; } else if (ev.button == PointerEventData.InputButton.Middle) { List <Type> allowed = inputAttachedTo.GetAllowedDataTypes(); if (allowed.Count != 0) { StringBuilder builder = new StringBuilder("Allowed:\n"); for (int i = 0; i < allowed.Count; i++) { string cleanName = TabMenu.CleanClassName(allowed[i].ToString()); builder.Append(cleanName); if (i != allowed.Count - 1) { builder.Append(", "); } } MouseToast.MakeToastFixed(2f, builder.ToString(), UnityEngine.Input.mousePosition); } } }
private void OnClick(BaseEventData arg0) { PointerEventData ev = arg0 as PointerEventData; if (ev == null) { return; } if (ev.button == PointerEventData.InputButton.Left) { if (ev.clickCount == 2) { if (status == LINKING) { CancelLink(); } Disconnect(); } if (status == IDLE) { StartLinking(this); } else if (linkInitiator == this) { CancelLink(); } } else if (ev.button == PointerEventData.InputButton.Right) { stay = !stay; } else if (ev.button == PointerEventData.InputButton.Middle) { Type type = outputAttachedTo.GetDataType(); MouseToast.MakeToastFixed(2f, "Type: " + TabMenu.CleanClassName(type.ToString()), UnityEngine.Input.mousePosition); } }
private void OnClickPoint(BaseEventData evData) { MouseToast.MakeToastFixed(2f, "Click and drag to the target node", UnityEngine.Input.mousePosition); }