DrawScrollDropShadow() 공개 정적인 메소드

public static DrawScrollDropShadow ( Rect scrollViewRect, float scrollY, float contentHeight ) : void
scrollViewRect UnityEngine.Rect
scrollY float
contentHeight float
리턴 void
        public void OnGUI(Rect rect)
        {
            int controlID = GUIUtility.GetControlID(FocusType.Keyboard);

            this.m_ScrollToItem = null;
            if (AudioMixerGroupTreeView.s_Styles == null)
            {
                AudioMixerGroupTreeView.s_Styles = new AudioMixerGroupTreeView.Styles();
            }
            this.m_AudioGroupTree.OnEvent();
            Rect r;
            Rect rect2;

            using (new EditorGUI.DisabledScope(this.m_Controller == null))
            {
                AudioMixerDrawUtils.DrawRegionBg(rect, out r, out rect2);
                AudioMixerDrawUtils.HeaderLabel(r, AudioMixerGroupTreeView.s_Styles.header, AudioMixerGroupTreeView.s_Styles.audioMixerGroupIcon);
            }
            if (this.m_Controller != null)
            {
                AudioMixerGroupController parent = (this.m_Controller.CachedSelection.Count != 1) ? this.m_Controller.masterGroup : this.m_Controller.CachedSelection[0];
                using (new EditorGUI.DisabledScope(EditorApplication.isPlaying))
                {
                    if (GUI.Button(new Rect(r.xMax - 15f, r.y + 3f, 15f, 15f), AudioMixerGroupTreeView.s_Styles.addText, EditorStyles.label))
                    {
                        this.AddAudioMixerGroup(parent);
                    }
                }
                this.m_AudioGroupTree.OnGUI(rect2, controlID);
                AudioMixerDrawUtils.DrawScrollDropShadow(rect2, this.m_AudioGroupTree.state.scrollPos.y, this.m_AudioGroupTree.gui.GetTotalSize().y);
                this.HandleKeyboardEvents(controlID);
                this.HandleCommandEvents(controlID);
            }
        }
예제 #2
0
        public void OnGUI(Rect rect)
        {
            int controlId = GUIUtility.GetControlID(FocusType.Keyboard);

            if (AudioMixersTreeView.s_Styles == null)
            {
                AudioMixersTreeView.s_Styles = new AudioMixersTreeView.Styles();
            }
            this.m_TreeView.OnEvent();
            Rect headerRect;
            Rect contentRect;

            AudioMixerDrawUtils.DrawRegionBg(rect, out headerRect, out contentRect);
            AudioMixerDrawUtils.HeaderLabel(headerRect, AudioMixersTreeView.s_Styles.header, AudioMixersTreeView.s_Styles.audioMixerIcon);
            if (GUI.Button(new Rect(headerRect.xMax - 15f, headerRect.y + 3f, 15f, 15f), AudioMixersTreeView.s_Styles.addText, EditorStyles.label))
            {
                (this.m_TreeView.gui as AudioMixersTreeViewGUI).BeginCreateNewMixer();
            }
            this.m_TreeView.OnGUI(contentRect, controlId);
            if (this.m_TreeView.data.rowCount == 0)
            {
                EditorGUI.BeginDisabledGroup(true);
                GUI.Label(new RectOffset(-20, 0, -2, 0).Add(contentRect), "No mixers found");
                EditorGUI.EndDisabledGroup();
            }
            AudioMixerDrawUtils.DrawScrollDropShadow(contentRect, this.m_TreeView.state.scrollPos.y, this.m_TreeView.gui.GetTotalSize().y);
            this.HandleCommandEvents(controlId);
            this.HandleObjectSelectorResult();
        }
예제 #3
0
        public void OnGUI(Rect rect)
        {
            int controlID = GUIUtility.GetControlID(FocusType.Keyboard);

            if (AudioMixersTreeView.s_Styles == null)
            {
                AudioMixersTreeView.s_Styles = new AudioMixersTreeView.Styles();
            }
            this.m_TreeView.OnEvent();
            Rect r;
            Rect rect2;

            AudioMixerDrawUtils.DrawRegionBg(rect, out r, out rect2);
            AudioMixerDrawUtils.HeaderLabel(r, AudioMixersTreeView.s_Styles.header, AudioMixersTreeView.s_Styles.audioMixerIcon);
            if (GUI.Button(new Rect(r.xMax - 15f, r.y + 3f, 15f, 15f), AudioMixersTreeView.s_Styles.addText, EditorStyles.label))
            {
                AudioMixersTreeViewGUI audioMixersTreeViewGUI = this.m_TreeView.gui as AudioMixersTreeViewGUI;
                audioMixersTreeViewGUI.BeginCreateNewMixer();
            }
            this.m_TreeView.OnGUI(rect2, controlID);
            if (this.m_TreeView.data.rowCount == 0)
            {
                using (new EditorGUI.DisabledScope(true))
                {
                    GUI.Label(new RectOffset(-20, 0, -2, 0).Add(rect2), "No mixers found");
                }
            }
            AudioMixerDrawUtils.DrawScrollDropShadow(rect2, this.m_TreeView.state.scrollPos.y, this.m_TreeView.gui.GetTotalSize().y);
            this.HandleCommandEvents(controlID);
            this.HandleObjectSelectorResult();
        }
예제 #4
0
        public void OnGUI(Rect rect)
        {
            int controlId = GUIUtility.GetControlID(FocusType.Keyboard);

            this.m_ScrollToItem = (AudioMixerGroupController)null;
            if (AudioMixerGroupTreeView.s_Styles == null)
            {
                AudioMixerGroupTreeView.s_Styles = new AudioMixerGroupTreeView.Styles();
            }
            this.m_AudioGroupTree.OnEvent();
            EditorGUI.BeginDisabledGroup((UnityEngine.Object) this.m_Controller == (UnityEngine.Object)null);
            Rect headerRect;
            Rect contentRect;

            AudioMixerDrawUtils.DrawRegionBg(rect, out headerRect, out contentRect);
            AudioMixerDrawUtils.HeaderLabel(headerRect, AudioMixerGroupTreeView.s_Styles.header, AudioMixerGroupTreeView.s_Styles.audioMixerGroupIcon);
            EditorGUI.EndDisabledGroup();
            if (!((UnityEngine.Object) this.m_Controller != (UnityEngine.Object)null))
            {
                return;
            }
            AudioMixerGroupController parent = this.m_Controller.CachedSelection.Count != 1 ? this.m_Controller.masterGroup : this.m_Controller.CachedSelection[0];

            EditorGUI.BeginDisabledGroup(EditorApplication.isPlaying);
            if (GUI.Button(new Rect(headerRect.xMax - 15f, headerRect.y + 3f, 15f, 15f), AudioMixerGroupTreeView.s_Styles.addText, EditorStyles.label))
            {
                this.AddAudioMixerGroup(parent);
            }
            EditorGUI.EndDisabledGroup();
            this.m_AudioGroupTree.OnGUI(contentRect, controlId);
            AudioMixerDrawUtils.DrawScrollDropShadow(contentRect, this.m_AudioGroupTree.state.scrollPos.y, this.m_AudioGroupTree.gui.GetTotalSize().y);
            this.HandleKeyboardEvents(controlId);
            this.HandleCommandEvents(controlId);
        }
예제 #5
0
        public void OnGUI(Rect rect)
        {
            int treeViewKeyboardControlID = GUIUtility.GetControlID(FocusType.Keyboard);

            m_ScrollToItem = null;

            if (s_Styles == null)
            {
                s_Styles = new Styles();
            }

            m_AudioGroupTree.OnEvent();

            Rect headerRect, contentRect;

            using (new EditorGUI.DisabledScope(m_Controller == null))
            {
                AudioMixerDrawUtils.DrawRegionBg(rect, out headerRect, out contentRect);
                AudioMixerDrawUtils.HeaderLabel(headerRect, s_Styles.header, s_Styles.audioMixerGroupIcon);
            }

            if (m_Controller != null)
            {
                AudioMixerGroupController parent = (m_Controller.CachedSelection.Count == 1) ? m_Controller.CachedSelection[0] : m_Controller.masterGroup;
                using (new EditorGUI.DisabledScope(EditorApplication.isPlaying))
                {
                    if (GUI.Button(new Rect(headerRect.xMax - 17f, headerRect.y + 3f, 16f, 16f), s_Styles.addButton, EditorStyles.iconButton))
                    {
                        AddAudioMixerGroup(parent);
                    }
                }

                m_AudioGroupTree.OnGUI(contentRect, treeViewKeyboardControlID);
                AudioMixerDrawUtils.DrawScrollDropShadow(contentRect, m_AudioGroupTree.state.scrollPos.y, m_AudioGroupTree.gui.GetTotalSize().y);

                HandleKeyboardEvents(treeViewKeyboardControlID);
                HandleCommandEvents(treeViewKeyboardControlID);
            }
        }
        public void OnGUI(Rect rect)
        {
            int treeViewKeyboardControlID = GUIUtility.GetControlID(FocusType.Keyboard);

            if (s_Styles == null)
            {
                s_Styles = new Styles();
            }

            m_TreeView.OnEvent();

            Rect headerRect, contentRect;

            AudioMixerDrawUtils.DrawRegionBg(rect, out headerRect, out contentRect);
            AudioMixerDrawUtils.HeaderLabel(headerRect, s_Styles.header, s_Styles.audioMixerIcon);

            if (GUI.Button(new Rect(headerRect.xMax - 15f, headerRect.y + 3f, 15f, 15f), s_Styles.addText, EditorStyles.label))
            {
                AudioMixersTreeViewGUI gui = m_TreeView.gui as AudioMixersTreeViewGUI;
                gui.BeginCreateNewMixer();
            }

            m_TreeView.OnGUI(contentRect, treeViewKeyboardControlID);

            if (m_TreeView.data.rowCount == 0)
            {
                using (new EditorGUI.DisabledScope(true))
                {
                    GUI.Label(new RectOffset(-20, 0, -2, 0).Add(contentRect), "No mixers found");
                }
            }

            AudioMixerDrawUtils.DrawScrollDropShadow(contentRect, m_TreeView.state.scrollPos.y, m_TreeView.gui.GetTotalSize().y);

            HandleCommandEvents(treeViewKeyboardControlID);
            HandleObjectSelectorResult();
        }