Esempio n. 1
0
    private void ToggleCheckGlobalFlag(bool record = true)
    {
        if (record)
        {
            HistoryManager.RecordNode(this);
        }

        nodeType = NodeType.CheckGlobalFlag;
        title    = "CHECK GLOBAL 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;

        globalItemDropdown = ScriptableObject.CreateInstance <DropdownGlobalItemBox>();
        globalItemDropdown.Init();

        // bind the dropdown to the global flag list
        globalItemDropdown.LoadItems(GlobalFlags.flags);

        splitter = ScriptableObject.CreateInstance <OutstreamSplitter>();
        splitter.Init(SplitterType.Flag);
    }
Esempio n. 2
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);
    }
Esempio n. 3
0
    private void ToggleCheckGlobalVariable(bool record = true)
    {
        if (record)
        {
            HistoryManager.RecordNode(this);
        }

        nodeType = NodeType.CheckGlobalVariable;
        title    = "CHECK GLOBAL VARIABLE";

        ToggleGlobalVariable();

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