public override ActionResult DoAction()
        {
            mode = InternalUtility.NextEnumValue(mode);

            return(new ActionResult(ActionResult.Status.Success,
                                    "Set Drag Select\n" + (mode == RectSelectMode.Complete ? "Complete" : "Intersect")));
        }
        bool GeoLevelShortcuts(Shortcut shortcut)
        {
            switch (shortcut.action)
            {
            case "Escape":
                ClearElementSelection();
                EditorUtility.ShowNotification("Top Level");
                UpdateSelection();
                selectMode = SelectMode.Object;
                return(true);

            // Used to be (incorrectly) named handle pivot, and since shortcuts are serialized this value is still valid
            case "Toggle Handle Pivot":
            case "Toggle Handle Orientation":
                VertexManipulationTool.handleOrientation = InternalUtility.NextEnumValue(VertexManipulationTool.handleOrientation);
                return(true);

            // TODO Remove once a workaround for non-upper-case shortcut chars is found
            case "Toggle Selection Mode":
                if (s_UniqueModeShortcuts)
                {
                    return(false);
                }
                ToggleSelectionMode();
                EditorUtility.ShowNotification(selectMode.ToString());
                return(true);

            case "Delete Face":
                EditorUtility.ShowNotification(EditorToolbarLoader.GetInstance <DeleteFaces>().DoAction().notification);
                return(true);

            case "Set Pivot":

                if (selection.Count > 0)
                {
                    foreach (ProBuilderMesh pbo in selection)
                    {
                        UndoUtility.RecordObjects(new UObject[2] {
                            pbo, pbo.transform
                        }, "Set Pivot");

                        if (pbo.selectedIndexesInternal.Length > 0)
                        {
                            pbo.CenterPivot(pbo.selectedIndexesInternal);
                        }
                        else
                        {
                            pbo.CenterPivot(null);
                        }
                    }

                    EditorUtility.ShowNotification("Set Pivot");
                }

                return(true);

            default:
                return(false);
            }
        }
 public override ActionResult DoAction()
 {
     handleOrientation = InternalUtility.NextEnumValue(handleOrientation);
     return(new ActionResult(ActionResult.Status.Success, "Set Handle Orientation\n" + k_Tooltips[(int)handleOrientation].title));
 }
 protected override ActionResult PerformActionImplementation()
 {
     handleOrientation = InternalUtility.NextEnumValue(handleOrientation);
     return(new ActionResult(ActionResult.Status.Success, "Set Handle Orientation\n" + k_Tooltips[(int)handleOrientation].title));
 }