OnEvent() public method

public OnEvent ( ) : void
return void
Exemplo n.º 1
0
        public void OnGUI()
        {
            Init();

            if (s_GuiContents == null)
            {
                s_GuiContents = new GUIContents();
            }
            AudioMixerDrawUtils.InitStyles();

            DetectControllerChange();

            m_GroupViews.OnEvent();
            m_SnapshotListView.OnEvent();

            DoToolbar();

            List <AudioMixerGroupController> allGroups;

            if (m_Controller != null)
            {
                allGroups = m_Controller.GetAllAudioGroupsSlow();
            }
            else
            {
                allGroups = new List <AudioMixerGroupController>();
            }

            var effectMap = GetEffectMap(allGroups);

            m_GroupTree.UseScrollView(m_LayoutMode == LayoutMode.Horizontal);

            if (m_LayoutMode == LayoutMode.Horizontal)
            {
                LayoutWithStripsOnTop(allGroups, effectMap);
            }
            else
            {
                LayoutWithStripsOnRightSideOneScrollBar(allGroups, effectMap);
            }

            // Ensure valid layout after maximizing window
            if (m_LastSize.x != position.width || m_LastSize.y != position.height)
            {
                m_RepaintCounter = 2;
                m_LastSize       = new Vector2(position.width, position.height);
            }

            RepaintIfNeeded();
        }