UnityEditor.AudioSourceInspector.DrawLegend C# (CSharp) Méthode

DrawLegend() private méthode

private DrawLegend ( ) : void
Résultat void
        private void DrawLegend()
        {
            List<Rect> list = new List<Rect>();
            List<AudioCurveWrapper> shownAudioCurves = this.GetShownAudioCurves();
            Rect rect = GUILayoutUtility.GetRect((float) 10f, (float) 20f);
            rect.x += 4f + EditorGUI.indent;
            rect.width -= 8f + EditorGUI.indent;
            int num = Mathf.Min(0x4b, Mathf.FloorToInt(rect.width / ((float) shownAudioCurves.Count)));
            for (int i = 0; i < shownAudioCurves.Count; i++)
            {
                list.Add(new Rect(rect.x + (num * i), rect.y, (float) num, rect.height));
            }
            bool flag = false;
            if (shownAudioCurves.Count != this.m_SelectedCurves.Length)
            {
                this.m_SelectedCurves = new bool[shownAudioCurves.Count];
                flag = true;
            }
            if (EditorGUIExt.DragSelection(list.ToArray(), ref this.m_SelectedCurves, GUIStyle.none) || flag)
            {
                bool flag2 = false;
                for (int k = 0; k < shownAudioCurves.Count; k++)
                {
                    if (this.m_SelectedCurves[k])
                    {
                        flag2 = true;
                    }
                }
                if (!flag2)
                {
                    for (int m = 0; m < shownAudioCurves.Count; m++)
                    {
                        this.m_SelectedCurves[m] = true;
                    }
                }
                this.SyncShownCurvesToLegend(shownAudioCurves);
            }
            for (int j = 0; j < shownAudioCurves.Count; j++)
            {
                EditorGUI.DrawLegend(list[j], shownAudioCurves[j].color, shownAudioCurves[j].legend.text, this.m_SelectedCurves[j]);
                if (shownAudioCurves[j].curveProp.hasMultipleDifferentValues)
                {
                    Rect rect2 = list[j];
                    Rect rect3 = list[j];
                    Rect rect4 = list[j];
                    GUI.Button(new Rect(rect2.x, rect3.y + 20f, rect4.width, 20f), "Different");
                }
            }
        }