public NodeGUI ( UnityEditor.Graphs node ) : void | ||
node | UnityEditor.Graphs | |
return | void |
public virtual void OnNodeDraw(GraphGUI host) { // Recapture the variable for the delegate. var node2 = this; // Subwindow style (active/nonactive) var isActive = host.selection.Contains(this); GUIStyle style = nodeStyle; if (nodeStyle == null) { style = Graphs.Styles.GetNodeStyle(this.style, this.color, isActive); } // Show the subwindow of this node. this.position = GUILayout.Window( this.GetInstanceID(), this.position, delegate { host.NodeGUI(node2); }, this.title, style, GUILayout.Width(150), GUILayout.Height(50) ); }
public virtual void OnNodeDraw(GraphGUI host) { #if UNITY_EDITOR // Recapture the variable for the delegate. var node2 = this; if ((runtimeInstance as BlockBase)._group != null) { return; } // Subwindow style (active/nonactive) var isActive = host.selection.Contains(this); GUIStyle style = BlockStyle; // if (nodeStyle == null) { BlockStyle = new GUIStyle(Graphs.Styles.GetNodeStyle(this.style, this.color, isActive)); if (_attrs != null) { // BlockStyle.normal.background = _visuals.iconTex; } } float w = 150, h = 50; if (_attrs != null) { w = _attrs.width; h = _attrs.height; } // Show the subwindow of this Block. this.position = GUILayout.Window( this.GetInstanceID(), this.position, delegate { host.NodeGUI(node2); }, this.title, GUILayout.Width(w), GUILayout.Height(h)); #endif }