private float GetHeightOfSection(AudioMixerWindow.SectionType sectionType)
        {
            float result;

            switch (sectionType)
            {
            case AudioMixerWindow.SectionType.MixerTree:
                result = this.m_MixersTree.GetTotalHeight();
                break;

            case AudioMixerWindow.SectionType.GroupTree:
                result = this.m_GroupTree.GetTotalHeight();
                break;

            case AudioMixerWindow.SectionType.ViewList:
                result = this.m_GroupViews.GetTotalHeight();
                break;

            case AudioMixerWindow.SectionType.SnapshotList:
                result = this.m_SnapshotListView.GetTotalHeight();
                break;

            default:
                Debug.LogError("Unhandled enum value");
                result = 0f;
                break;
            }
            return(result);
        }
        private void ChangeSectionOrder(object userData)
        {
            Vector2 vector = (Vector2)userData;
            int     num    = (int)vector.x;
            int     num2   = (int)vector.y;
            int     num3   = Mathf.Clamp(num + num2, 0, this.m_SectionOrder.Length - 1);

            if (num3 != num)
            {
                AudioMixerWindow.SectionType sectionType = this.m_SectionOrder[num];
                this.m_SectionOrder[num]  = this.m_SectionOrder[num3];
                this.m_SectionOrder[num3] = sectionType;
            }
        }
示例#3
0
        private void ChangeSectionOrder(object userData)
        {
            Vector2 vector2 = (Vector2)userData;
            int     x       = (int)vector2.x;
            int     y       = (int)vector2.y;
            int     index   = Mathf.Clamp(x + y, 0, this.m_SectionOrder.Length - 1);

            if (index == x)
            {
                return;
            }
            AudioMixerWindow.SectionType sectionType = this.m_SectionOrder[x];
            this.m_SectionOrder[x]     = this.m_SectionOrder[index];
            this.m_SectionOrder[index] = sectionType;
        }
示例#4
0
        private float GetHeightOfSection(AudioMixerWindow.SectionType sectionType)
        {
            switch (sectionType)
            {
            case AudioMixerWindow.SectionType.MixerTree:
                return(this.m_MixersTree.GetTotalHeight());

            case AudioMixerWindow.SectionType.GroupTree:
                return(this.m_GroupTree.GetTotalHeight());

            case AudioMixerWindow.SectionType.ViewList:
                return(this.m_GroupViews.GetTotalHeight());

            case AudioMixerWindow.SectionType.SnapshotList:
                return(this.m_SnapshotListView.GetTotalHeight());

            default:
                Debug.LogError((object)"Unhandled enum value");
                return(0.0f);
            }
        }