예제 #1
0
    private void ToggleCheckLocalFlag(bool record = true)
    {
        if (record)
        {
            HistoryManager.RecordNode(this);
        }

        nodeType = NodeType.CheckLocalFlag;
        title    = "CHECK LOCAL FLAG";

        style         = new GUIStyle(SDEStyles.nodeSmallDefault);
        defaultStyle  = new GUIStyle(SDEStyles.nodeSmallDefault);
        selectedStyle = new GUIStyle(SDEStyles.nodeSmallSelected);

        rect.width       = NodeManager.FLAG_WIDTH;
        rect.height      = NodeManager.FLAG_HEIGHT;
        clickRect.width  = NodeManager.FLAG_WIDTH;
        clickRect.height = NodeManager.FLAG_HEIGHT;

        localFlagDropdown = ScriptableObject.CreateInstance <DropdownLocalFlagBox>();
        localFlagDropdown.Init();

        splitter = ScriptableObject.CreateInstance <OutstreamSplitter>();
        splitter.Init(SplitterType.Flag);

        // bind the dropdown menu to the main editor's local flag list
        localFlagDropdown.LinkFlags(NodeManager.mainEditor.localFlagsMenu.items);
    }
예제 #2
0
    private void ToggleSetLocalFlag(bool record = true)
    {
        if (record)
        {
            HistoryManager.RecordNode(this);
        }

        nodeType = NodeType.SetLocalFlag;
        title    = "SET LOCAL FLAG";

        style         = new GUIStyle(SDEStyles.nodeSmallDefault);
        defaultStyle  = new GUIStyle(SDEStyles.nodeSmallDefault);
        selectedStyle = new GUIStyle(SDEStyles.nodeSmallSelected);

        rect.width       = NodeManager.FLAG_WIDTH;
        rect.height      = NodeManager.FLAG_HEIGHT;
        clickRect.width  = NodeManager.FLAG_WIDTH;
        clickRect.height = NodeManager.FLAG_HEIGHT;

        outPoint = ScriptableObject.CreateInstance <ConnectionPoint>();
        outPoint.Init(this, ConnectionPointType.Out);

        localFlagDropdown = ScriptableObject.CreateInstance <DropdownLocalFlagBox>();
        localFlagDropdown.Init();

        // bind the dropdown menu to the main editor's local flag list
        localFlagDropdown.LinkFlags(NodeManager.mainEditor.localFlagsMenu.items);
    }