public void Init(ContextMenuData node) { nameText.text = node.name; bool hasSubMenu = node.children.Count > 0; subContextIcon.gameObject.SetActive(hasSubMenu); if (hasSubMenu) { button.onClick.AddListener( () => { var container = Utility.CreatePrefab <ContextContainer>("Prefabs/ContextContainer", subContextTransform); container.Init(node.children /*[0].children*/.ToArray()); SignalSystem.InvokeMenuItemClicked(node, container); } ); } else { button.onClick.AddListener( () => { node.callback?.Invoke(); } ); } }
public void OnEndDrag(PointerEventData eventData) { foreach (var item in eventData.hovered) { var input = item.GetComponent <SocketInput>(); if (input != null) { SignalSystem.InvokeOutputSocketDragDropTo(input); return; } } SignalSystem.InvokeOutputSocketDragDropTo(null); }
public void OnDrag(PointerEventData eventData) { SignalSystem.InvokeSocketDragFrom(this); }
public void OnPointerClick(PointerEventData eventData) { SignalSystem.InvokeOutputSocketClick(this, eventData); }
public void OnDrag(PointerEventData eventData) { SignalSystem.InvokeNodePointerDrag(_parentNode, eventData); }
public void OnPointerClick(PointerEventData eventData) { SignalSystem.InvokeNodePointerClick(_parentNode, eventData); }
public void OnPointerClick(PointerEventData eventData) { SignalSystem.InvokeNodeConnectionPointerClick(connId, eventData); }