コード例 #1
0
ファイル: FlowchartWindow.cs プロジェクト: rstruk/ProjetLaby
        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;
        }
コード例 #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);
        }
コード例 #3
0
        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;
        }