UnityEditor.SceneView.DefaultHandles C# (CSharp) Method

DefaultHandles() private method

private DefaultHandles ( ) : void
return void
        private void DefaultHandles()
        {
            EditorGUI.BeginChangeCheck();
            bool flag = Event.current.GetTypeForControl(GUIUtility.hotControl) == EventType.MouseDrag;
            bool flag2 = Event.current.GetTypeForControl(GUIUtility.hotControl) == EventType.MouseUp;
            if (GUIUtility.hotControl == 0)
            {
                s_CurrentTool = !Tools.viewToolActive ? Tools.current : Tool.View;
            }
            Tool tool = (Event.current.type != EventType.Repaint) ? s_CurrentTool : Tools.current;
            switch ((tool + 1))
            {
                case Tool.Rotate:
                    MoveTool.OnGUI(this);
                    break;

                case Tool.Scale:
                    RotateTool.OnGUI(this);
                    break;

                case Tool.Rect:
                    ScaleTool.OnGUI(this);
                    break;

                case (Tool.Rect | Tool.Move):
                    RectTool.OnGUI(this);
                    break;
            }
            if ((EditorGUI.EndChangeCheck() && EditorApplication.isPlaying) && flag)
            {
                Physics2D.SetEditorDragMovement(true, Selection.gameObjects);
            }
            if (EditorApplication.isPlaying && flag2)
            {
                Physics2D.SetEditorDragMovement(false, Selection.gameObjects);
            }
        }