Ejemplo n.º 1
0
        public static Block CreateBlock(Flowchart flowchart, Vector2 position)
        {
            Block newBlock = flowchart.CreateBlock(position);
            Undo.RegisterCreatedObjectUndo(newBlock, "New Block");
            ShowBlockInspector(flowchart);
            flowchart.selectedBlock = newBlock;
            flowchart.ClearSelectedCommands();

            return newBlock;
        }
Ejemplo n.º 2
0
        public static Block CreateBlock(Flowchart flowchart, Vector2 position)
        {
            Block newBlock = flowchart.CreateBlock(position);

            Undo.RegisterCreatedObjectUndo(newBlock, "New Block");
            ShowBlockInspector(flowchart);
            flowchart.SelectedBlock = newBlock;
            flowchart.ClearSelectedCommands();

            return(newBlock);
        }
        public static Block CreateBlock(Flowchart flowchart, Vector2 position)
        {
            Block newBlock = flowchart.CreateBlock(position);
            Undo.RegisterCreatedObjectUndo(newBlock, "New Block");

            // Use AddSelected instead of Select for when multiple blocks are duplicated
            flowchart.AddSelectedBlock(newBlock);
            SetBlockForInspector(flowchart, newBlock);

            return newBlock;
        }