private void Normals(int verticalOffset)
        {
            if (computer.hasMorph && !MorphWindow.editShapeMode)
            {
                return;
            }
            Rect barRect = new Rect(0f, verticalOffset, Screen.width, 35 * scale);

            if (barRect.Contains(Event.current.mousePosition))
            {
                mouseHoversToolbar = true;
            }
            GUI.color = new Color(1f, 1f, 1f, 0.3f);
            GUI.Box(barRect, "", SplineEditorGUI.whiteBox);
            GUI.color = SplineEditorGUI.activeColor;
            if (SplineEditorGUI.Button(new Rect(5 * scale, verticalOffset + 5 * scale, 130 * scale, 25 * scale), "Set Normals:"))
            {
                SetSelectedNormals();
            }
            bool hover = SplineEditorGUI.DropDown(new Rect(160 * scale, verticalOffset + 5 * scale, 150 * scale, 25 * scale), SplineEditorGUI.defaultButton, new string[] { "At Camera", "Align with Camera", "Calculate", "Left", "Right", "Up", "Down", "Forward", "Back", "Inverse", "At Avg. Center", "By Direction" }, true, ref normalEditor.setNormalMode);

            if (hover)
            {
                mouseHoversToolbar = true;
            }
        }
        private void Mirror(int verticalOffset)
        {
            if (computer.hasMorph && !MorphWindow.editShapeMode)
            {
                return;
            }
            Rect barRect = new Rect(0f, verticalOffset, Screen.width, 35 * scale);

            if (barRect.Contains(Event.current.mousePosition))
            {
                mouseHoversToolbar = true;
            }
            GUI.color = new Color(1f, 1f, 1f, 0.3f);
            GUI.Box(barRect, "", SplineEditorGUI.whiteBox);
            GUI.color = SplineEditorGUI.activeColor;
            if (SplineEditorGUI.Button(new Rect(5 * scale, verticalOffset + 5 * scale, 100 * scale, 25 * scale), "Cancel"))
            {
                ExitMirrorMode();
            }
            if (SplineEditorGUI.Button(new Rect(115 * scale, verticalOffset + 5 * scale, 100 * scale, 25 * scale), "Save"))
            {
                SaveMirror();
            }

            DreamteckEditorGUI.Label(new Rect(215 * scale, verticalOffset + 5 * scale, 50 * scale, 25 * scale), "Axis", true);
            int  axis  = (int)mirrorEditor.axis;
            bool hover = SplineEditorGUI.DropDown(new Rect(270 * scale, verticalOffset + 5 * scale, 60 * scale, 25 * scale), SplineEditorGUI.defaultButton, new string[] { "X", "Y", "Z" }, true, ref axis);

            mirrorEditor.axis = (SplinePointMirrorEditor.Axis)axis;
            if (hover)
            {
                mouseHoversToolbar = true;
            }

            DreamteckEditorGUI.Label(new Rect(315 * scale, verticalOffset + 5 * scale, 60 * scale, 25 * scale), "Flip", true);
            mirrorEditor.flip = GUI.Toggle(new Rect(380 * scale, verticalOffset + 10 * scale, 25 * scale, 25 * scale), mirrorEditor.flip, "");

            DreamteckEditorGUI.Label(new Rect(390 * scale, verticalOffset + 5 * scale, 120 * scale, 25 * scale), "Weld Distance", true);

            mirrorEditor.weldDistance = SplineEditorGUI.FloatField(new Rect(525 * scale, verticalOffset + 5 * scale, 50 * scale, 25 * scale), mirrorEditor.weldDistance);
            mirrorEditor.weldDistance = SplineEditorGUI.FloatDrag(new Rect(390 * scale, verticalOffset + 5 * scale, 120 * scale, 25 * scale), mirrorEditor.weldDistance);
            if (mirrorEditor.weldDistance < 0f)
            {
                mirrorEditor.weldDistance = 0f;
            }

            DreamteckEditorGUI.Label(new Rect(570 * scale, verticalOffset + 5 * scale, 120 * scale, 25 * scale), "Center  X:", true);
            mirrorEditor.center.x = SplineEditorGUI.FloatField(new Rect(700 * scale, verticalOffset + 5 * scale, 50 * scale, 25 * scale), mirrorEditor.center.x);

            DreamteckEditorGUI.Label(new Rect(720 * scale, verticalOffset + 5 * scale, 50 * scale, 25 * scale), "Y:", true);
            mirrorEditor.center.y = SplineEditorGUI.FloatField(new Rect(770 * scale, verticalOffset + 5 * scale, 50 * scale, 25 * scale), mirrorEditor.center.y);
            DreamteckEditorGUI.Label(new Rect(790 * scale, verticalOffset + 5 * scale, 50 * scale, 25 * scale), "Z:", true);
            mirrorEditor.center.z = SplineEditorGUI.FloatField(new Rect(840 * scale, verticalOffset + 5 * scale, 50 * scale, 25 * scale), mirrorEditor.center.z);
        }
        private void CreateToolbar(int verticalOffset)
        {
            Rect barRect = new Rect(0f, verticalOffset, Screen.width, 35 * scale);

            if (barRect.Contains(Event.current.mousePosition))
            {
                mouseHoversToolbar = true;
            }
            GUI.color = new Color(1f, 1f, 1f, 0.3f);
            GUI.Box(barRect, "", SplineEditorGUI.whiteBox);
            GUI.color = SplineEditorGUI.activeColor;
            DreamteckEditorGUI.Label(new Rect(5 * scale, verticalOffset + 5 * scale, 105 * scale, 25 * scale), "Place method:", true);
            bool hover = SplineEditorGUI.DropDown(new Rect(110 * scale, verticalOffset + 5 * scale, 130 * scale, 25 * scale), SplineEditorGUI.defaultButton, new string[] { "Camera Plane", "Insert", "Surface", "X Plane", "Y Plane", "Z Plane" }, true, ref createPointMode);

            if (hover)
            {
                mouseHoversToolbar = true;
            }
            DreamteckEditorGUI.Label(new Rect(220 * scale, verticalOffset + 5 * scale, 100 * scale, 25 * scale), "Normal:", true);
            hover = SplineEditorGUI.DropDown(new Rect(320 * scale, verticalOffset + 5 * scale, 160 * scale, 25 * scale), SplineEditorGUI.defaultButton, new string[] { "Auto", "Look at Camera", "Align with Camera", "Calculate", "Left", "Right", "Up", "Down", "Forward", "Back" }, true, ref createNormalMode);
            if (hover)
            {
                mouseHoversToolbar = true;
            }
            DreamteckEditorGUI.Label(new Rect(800 * scale, verticalOffset + 5 * scale, 90 * scale, 25 * scale), "Add Node", true);
            createNodeOnCreatePoint = GUI.Toggle(new Rect(890 * scale, verticalOffset + 10 * scale, 25 * scale, 25 * scale), createNodeOnCreatePoint, "");

            bool showNormalField = false;

            if (createPointMode >= 3 && createPointMode <= 5)
            {
                DreamteckEditorGUI.Label(new Rect(500 * scale, verticalOffset + 5 * scale, 80 * scale, 30 * scale), "Grid offset:", true);
                showNormalField = true;
            }
            else if (createPointMode == 2)
            {
                DreamteckEditorGUI.Label(new Rect(480 * scale, verticalOffset + 5 * scale, 100 * scale, 30 * scale), "Normal offset:", true);
                showNormalField = true;
                if (SplineEditorGUI.Button(new Rect(925 * scale, verticalOffset * scale + 5, 95 * scale, 25 * scale), "LayerMask"))
                {
                    LayermaskWindow maskWindow = EditorWindow.GetWindow <LayermaskWindow>(true);
                    maskWindow.position = new Rect(Event.current.mousePosition.x, Event.current.mousePosition.y, 10, 10);
                    maskWindow.Init(this, new Vector2(150, 30), new Vector2(150, 30));
                }
            }
            else if (createPointMode == 0)
            {
                DreamteckEditorGUI.Label(new Rect(500 * scale, verticalOffset + 5 * scale, 80 * scale, 30 * scale), "Far plane:", true);
                showNormalField = true;
            }

            if (showNormalField)
            {
                createPointOffset = SplineEditorGUI.FloatField(new Rect(580 * scale, verticalOffset + 5 * scale, 50 * scale, 25 * scale), createPointOffset);
                createPointOffset = SplineEditorGUI.FloatDrag(new Rect(500 * scale, verticalOffset + 5 * scale, 80 * scale, 25 * scale), createPointOffset);
                if (createPointOffset < 0f && createPointMode < 3)
                {
                    createPointOffset = 0f;
                }
            }

            minWidth = 790;
            if (createPointMode != 1)
            {
                DreamteckEditorGUI.Label(new Rect(625 * scale, verticalOffset + 5 * scale, 80 * scale, 30 * scale), "Append:", true);
                if (SplineEditorGUI.DropDown(new Rect(705 * scale, verticalOffset + 5 * scale, 100 * scale, 25 * scale), SplineEditorGUI.defaultButton, new string[] { "End", "Beginning" }, true, ref appendMode))
                {
                    mouseHoversToolbar = true;
                }
                minWidth = 1100;
            }
        }