public void AddOnBlock(AlgorithmBlockUI sender) { switch (_addBlockStep) { case AddBlockSteps.SetTarget: { _addTarget = sender; _isAddBlock = true; _contextMenu.ClearContextMenu(); if (_addTarget.BlockData.Type == BlockType.If || _addTarget.BlockData.Type == BlockType.While) { SetAddInsertTypeMenuItems(); _contextMenu.gameObject.SetActive(true); _addBlockStep = AddBlockSteps.ChoiceInsertType; } else { _addInsertInside = false; SetAddTypeMenuItems(); _contextMenu.gameObject.SetActive(true); _addBlockStep = AddBlockSteps.ChoiceBlockType; } } break; } }
public void CursorOnLabel(ValueUI valueUi, ActiveLabel sender) { switch (_setLabelSteps) { case SetLabelSteps.SetTarget: { _setLabelTarget = sender; _isSetedLabelVariable = false; _setLabelValueUi = valueUi; _setLabelSteps = SetLabelSteps.ChoiceLabelType; _contextMenu.ClearContextMenu(); SetLabelTypeMenuItems(); _contextMenu.gameObject.SetActive(true); } break; } }