public void ShowFocusConfirmationDialog() { if (RobotsList.Dropdown.dropdownItems.Count == 0 || EndEffectorList.Dropdown.dropdownItems.Count == 0 || OrientationsList.Dropdown.dropdownItems.Count == 0) { Base.Notifications.Instance.ShowNotification("Failed to update orientation.", "Something is not selected"); return; } CustomDropdown robotsListDropdown = RobotsList.Dropdown; CustomDropdown endEffectorDropdown = EndEffectorList.Dropdown; CustomDropdown orientationDropdown = OrientationsList.Dropdown; if (endEffectorDropdown.dropdownItems.Count == 0) { FocusConfirmationDialog.EndEffectorId = ""; } else { FocusConfirmationDialog.EndEffectorId = endEffectorDropdown.selectedText.text; } FocusConfirmationDialog.RobotId = robotsListDropdown.selectedText.text; FocusConfirmationDialog.OrientationId = CurrentActionPoint.GetNamedOrientationByName(orientationDropdown.selectedText.text).Id; FocusConfirmationDialog.OrientationName = orientationDropdown.selectedText.text; FocusConfirmationDialog.UpdatePosition = UpdatePositionToggle.GetComponent <Toggle>().isOn; FocusConfirmationDialog.ActionPointId = CurrentActionPoint.Data.Id; FocusConfirmationDialog.ActionPointName = CurrentActionPoint.Data.Name; FocusConfirmationDialog.Init(); FocusConfirmationDialog.WindowManager.OpenWindow(); }
public override object GetValue() { string value = (string)base.GetValue(); if (value == null) { return(null); } Base.ActionPoint actionPoint = Base.Scene.Instance.GetactionpointByName(value.Split('.').First()); return(actionPoint.GetNamedOrientationByName(value.Split('.').Last()).Id); }