UnityEditor.AudioSourceInspector.DrawLabel C# (CSharp) Method

DrawLabel() private method

private DrawLabel ( string label, float value, Rect r ) : void
label string
value float
r UnityEngine.Rect
return void
        private void DrawLabel(string label, float value, Rect r)
        {
            Vector2 vector = ms_Styles.labelStyle.CalcSize(new GUIContent(label));
            vector.x += 2f;
            Vector2 vector2 = this.m_CurveEditor.DrawingToViewTransformPoint(new Vector2(value / this.m_MaxDistance.floatValue, 0f));
            Vector2 vector3 = this.m_CurveEditor.DrawingToViewTransformPoint(new Vector2(value / this.m_MaxDistance.floatValue, 1f));
            GUI.BeginGroup(r);
            Color color = Handles.color;
            Handles.color = new Color(1f, 0f, 0f, 0.3f);
            Handles.DrawLine(new Vector3(vector2.x, vector2.y, 0f), new Vector3(vector3.x, vector3.y, 0f));
            Handles.DrawLine(new Vector3(vector2.x + 1f, vector2.y, 0f), new Vector3(vector3.x + 1f, vector3.y, 0f));
            Handles.color = color;
            GUI.Label(new Rect(Mathf.Floor(vector3.x - (vector.x / 2f)), 2f, vector.x, 15f), label, ms_Styles.labelStyle);
            GUI.EndGroup();
        }