Exemplo n.º 1
0
        public override void OnGUI(global::NodeEditor nodeEditor, int id)
        {
            myRect = GUILayoutUtility.GetRect(10, 10);
            GUI.Box(myRect, "");
            if (Event.current.type == EventType.Repaint)
            {
                centerLastFrame = myRect.center + Parent.Position;
            }

            var active = nodeEditor.activeControlSet.Get <NodeEditorGrabBox>();

            if (active != null)
            {
                if (Event.current.type == EventType.MouseUp)
                {
                    if (myRect.Contains(Event.current.mousePosition))
                    {
                        active.OnDrop(this);
                    }
                }
            }
        }
Exemplo n.º 2
0
 public override void ProcessEvents(global::NodeEditor nodeEditor)
 {
     var active = nodeEditor.activeControlSet.Get <NodeEditorGrabBox>();
 }