Beispiel #1
0
        public Node(Vector2 position, float width, float height, GUIStyle nodeStyle, GUIStyle selectedStyle,
                    GUIStyle inPointStyle, GUIStyle outPointStyle, Action <ConnectionPoint> OnClickInPoint,
                    Action <ConnectionPoint> OnClickOutPoint, Action <Node> OnClickRemoveNode, string inPointID,
                    string outPointID, EmailListing emailListing, NodeBasedEditor nodeBasedEditor)
        {
            float rowHeight = height / 7;

            rectID            = new Rect(position.x, position.y + rowHeight, width, rowHeight);
            styleID           = new GUIStyle();
            styleID.alignment = TextAnchor.UpperCenter;

            rect  = new Rect(position.x, position.y, width, height);
            style = nodeStyle;

            inPoint           = new ConnectionPoint(this, ConnectionPointType.In, inPointStyle, OnClickInPoint, inPointID);
            outPoint          = new ConnectionPoint(this, ConnectionPointType.Out, outPointStyle, OnClickOutPoint, outPointID);
            defaultNodeStyle  = nodeStyle;
            selectedNodeStyle = selectedStyle;
            OnRemoveNode      = OnClickRemoveNode;

            this._emailListing = emailListing;
            title = _emailListing.caseName;

            this.nodeBasedEditor = nodeBasedEditor;
        }
Beispiel #2
0
        private static void OpenWindow()
        {
            NodeBasedEditor window = GetWindow <NodeBasedEditor>();

            window.titleContent = new GUIContent("Storyline editor");
        }