Ejemplo n.º 1
0
        public void DrawGUI(Rect p_rect)
        {
            // Sometimes when looking for a serialization issue it is good to keep null references for better debug/migration
            if (DashEditorCore.EditorConfig.deleteNull)
            {
                RemoveNullReferences();
            }

            // Draw boxes
            LinqExtensions.ForEach(_boxes.Where(r => r != null), r => r.DrawGUI());

            _connections.RemoveAll(c => !c.IsValid());

            // Draw connections
            LinqExtensions.ForEach(_connections.Where(c => c != null).ToArray(), c => c.DrawGUI());

            // Draw Nodes
            // Preselect non null to avoid null states from serialization issues
            LinqExtensions.ForEach(_nodes.Where(n => n != null), n => n.DrawGUI(p_rect));

            // Draw user interaction with connections
            NodeConnection.DrawConnectionToMouse(connectingNode, connectingOutputIndex, Event.current.mousePosition);

            //DashEditorCore.SetDirty();
        }
Ejemplo n.º 2
0
 public void DrawComments(Rect p_rect, bool p_zoomed)
 {
     LinqExtensions.ForEach(_nodes.Where(n => n != null), n => n.DrawComment(p_rect, p_zoomed));
 }