protected virtual void SelectBlock(Flowchart flowchart, Block block) { // Select the block and also select currently executing command ShowBlockInspector(flowchart); flowchart.SelectedBlock = block; flowchart.ClearSelectedCommands(); if (block.ActiveCommand != null) { flowchart.AddSelectedCommand(block.ActiveCommand); } }
Command AddNewCommand() { Flowchart flowchart = FlowchartWindow.GetFlowchart(); if (flowchart == null) { return(null); } var block = flowchart.SelectedBlock; if (block == null) { return(null); } var newCommand = Undo.AddComponent <Comment>(block.gameObject) as Command; newCommand.ItemId = flowchart.NextItemId(); flowchart.ClearSelectedCommands(); flowchart.AddSelectedCommand(newCommand); return(newCommand); }
protected virtual void SelectBlock(Flowchart flowchart, Block block) { // Select the block and also select currently executing command ShowBlockInspector(flowchart); flowchart.selectedBlock = block; flowchart.ClearSelectedCommands(); if (block.activeCommand != null) { flowchart.AddSelectedCommand(block.activeCommand); } }
protected static void SetBlockForInspector(Flowchart flowchart, Block block) { ShowBlockInspector(flowchart); flowchart.ClearSelectedCommands(); if (block.ActiveCommand != null) { flowchart.AddSelectedCommand(block.ActiveCommand); } }