public void OnInputFinishEdit(string text) { if (index == -1 || text.Length == 0) { return; } object obj = uiManager.ExpContainer.ConvertToCorrectType(text); if (obj.GetType().IsInstanceOfType(uiManager.ExpContainer.GetDefaultValue(selectedParameter))) { BlockParameterValue.GetComponent <Text>().text = "Value: " + text; ConfigurationBlockManager blockManager = uiManager.BlockView.GetComponent <ConfigurationBlockManager>(); foreach (GameObject g in blockManager.SelectedBlocks) { ((List <object>)uiManager.ExpContainer.Data[selectedParameter])[g.GetComponent <BlockComponent>().BlockID] = obj; } UpdateBlockPropertyText(); uiManager.Dirty = true; } else { uiManager.ConfirmationPopup.GetComponent <ConfirmationPopup>().ShowPopup( "The input type does not match the correct type for this property.", null); } }
public void OnDropdownFinishEdit(int option) { // If user selected blank, don't edit the parameter if (option == 0) { return; } BlockParameterValue.GetComponent <Text>().text = "Value: " + DropdownInputField.GetComponent <Dropdown>().options[option].text; ConfigurationBlockManager blockManager = uiManager.BlockView.GetComponent <ConfigurationBlockManager>(); foreach (GameObject g in blockManager.SelectedBlocks) { ((List <object>)uiManager.ExpContainer.Data[selectedParameter])[g.GetComponent <BlockComponent>().BlockID] = DropdownInputField.GetComponent <Dropdown>().options[option].text; } uiManager.BlockView.GetComponent <ConfigurationBlockManager>().ResetBlockText(); UpdateBlockPropertyText(); uiManager.Dirty = true; }