private bool LayoutLaunchConfigEdit(int index) { bool correct = true; GUILayout.BeginHorizontal(); outputPayload = textAllPayloads[index].GetText(); // Display any invalid data warnings if (outputPayload == null || !double.TryParse(outputPayload.ToString(), out payload)) { //GUILayout.Label("Invalid payload!", klvGUIStyles.WarningLabel); configErrorReason = String.IsNullOrEmpty(configErrorReason) ? "Invalid payload!" : configErrorReason; correct = false; } else if (!comboAllDestinations[index].isItemSelected) { //GUILayout.Label("Destination missing!", klvGUIStyles.WarningLabel); configErrorReason = String.IsNullOrEmpty(configErrorReason) ? "Destination missing!" : configErrorReason; correct = false; } else { newConfigs[index].SetPayload(payload); newConfigs[index].SetTarget(KLVCore.GetDestination(comboAllDestinations[index].selectedItemName)); } textAllPayloads[index].DoLayout(correct ? klvGUIStyles.StandardLabel : klvGUIStyles.WarningLabel); comboAllDestinations[index].DoLayout(null); buttonAllRemoveConfigs[index].DoLayout(klvGUIStyles.StandardButton, "Remove", true); GUILayout.EndHorizontal(); payload = 0; return(correct); }