Esempio n. 1
0
        private void DrawNode(Node node)
        {
            NodeViewData viewData = this.GetViewDataForNode(node);
            Rect         nodeRect = this.GetNodeRect(node);

            if (this.IsNodeSelected(node))
            {
                Rect     expandedNodeRect  = RectUtil.Expand(nodeRect, kNodeSelectedLineWeight);
                GUIStyle nodeSelectedStyle = GUIStyleUtil.StyleWithTexture(GUI.skin.box, kNodeSelectedTexture);
                GUI.Box(expandedNodeRect, "", nodeSelectedStyle);
            }

            Rect nodeShadowRect = nodeRect;

            nodeShadowRect.position = nodeShadowRect.position + new Vector2(kNodeShadowOffset, kNodeShadowOffset);
            GUI.Box(nodeShadowRect, "", (GUIStyle)"NodeShadow");

            GUIStyle nodeStyle = (GUIStyle)"Node";

            if (this.TargetGraph.IsStartingNode(node))
            {
                nodeStyle = (GUIStyle)"StartingNode";
            }

            GUI.Box(nodeRect, viewData.name, nodeStyle);
        }