UnityEditor.ColorPicker.DrawLabelOutsideRect C# (CSharp) Method

DrawLabelOutsideRect() private static method

private static DrawLabelOutsideRect ( Rect position, string label, LabelLocation labelLocation ) : void
position UnityEngine.Rect
label string
labelLocation LabelLocation
return void
        private static void DrawLabelOutsideRect(Rect position, string label, LabelLocation labelLocation)
        {
            Matrix4x4 matrix = GUI.matrix;
            Rect rect = new Rect(position.x, position.y - 18f, position.width, 16f);
            switch (labelLocation)
            {
                case LabelLocation.Bottom:
                    rect = new Rect(position.x, position.yMax, position.width, 16f);
                    break;

                case LabelLocation.Left:
                    GUIUtility.RotateAroundPivot(-90f, position.center);
                    break;

                case LabelLocation.Right:
                    GUIUtility.RotateAroundPivot(90f, position.center);
                    break;
            }
            EditorGUI.BeginDisabledGroup(true);
            GUI.Label(rect, label, styles.label);
            EditorGUI.EndDisabledGroup();
            GUI.matrix = matrix;
        }