Exemple #1
0
        public void OnGUI()
        {
            this.Init();
            if (AudioMixerWindow.s_GuiContents == null)
            {
                AudioMixerWindow.s_GuiContents = new AudioMixerWindow.GUIContents();
            }
            AudioMixerDrawUtils.InitStyles();
            this.DetectControllerChange();
            this.m_GroupViews.OnEvent();
            this.m_SnapshotListView.OnEvent();
            this.DoToolbar();
            List <AudioMixerGroupController> allGroups = !((UnityEngine.Object) this.m_Controller != (UnityEngine.Object)null) ? new List <AudioMixerGroupController>() : this.m_Controller.GetAllAudioGroupsSlow();
            Dictionary <AudioMixerEffectController, AudioMixerGroupController> effectMap = this.GetEffectMap(allGroups);

            this.m_GroupTree.UseScrollView(this.m_LayoutMode == AudioMixerWindow.LayoutMode.Horizontal);
            if (this.m_LayoutMode == AudioMixerWindow.LayoutMode.Horizontal)
            {
                this.LayoutWithStripsOnTop(allGroups, effectMap);
            }
            else
            {
                this.LayoutWithStripsOnRightSideOneScrollBar(allGroups, effectMap);
            }
            if ((double)this.m_LastSize.x != (double)this.position.width || (double)this.m_LastSize.y != (double)this.position.height)
            {
                this.m_RepaintCounter = 2;
                this.m_LastSize       = new Vector2(this.position.width, this.position.height);
            }
            this.RepaintIfNeeded();
        }
		public void OnGUI()
		{
			this.Init();
			if (AudioMixerWindow.s_GuiContents == null)
			{
				AudioMixerWindow.s_GuiContents = new AudioMixerWindow.GUIContents();
			}
			AudioMixerDrawUtils.InitStyles();
			this.DetectControllerChange();
			this.m_GroupViews.OnEvent();
			this.m_SnapshotListView.OnEvent();
			this.DoToolbar();
			List<AudioMixerGroupController> allGroups;
			if (this.m_Controller != null)
			{
				allGroups = this.m_Controller.GetAllAudioGroupsSlow();
			}
			else
			{
				allGroups = new List<AudioMixerGroupController>();
			}
			Dictionary<AudioMixerEffectController, AudioMixerGroupController> effectMap = this.GetEffectMap(allGroups);
			if (this.m_LayoutMode == AudioMixerWindow.LayoutMode.Horizontal)
			{
				this.LayoutWithStripsOnTop(allGroups, effectMap);
			}
			else
			{
				this.LayoutWithStripsOnRightSideOneScrollBar(allGroups, effectMap);
			}
			if (this.m_LastSize.x != base.position.width || this.m_LastSize.y != base.position.height)
			{
				this.m_RepaintCounter = 2;
				this.m_LastSize = new Vector2(base.position.width, base.position.height);
			}
			this.RepaintIfNeeded();
		}
 public void OnGUI()
 {
   this.Init();
   if (AudioMixerWindow.s_GuiContents == null)
     AudioMixerWindow.s_GuiContents = new AudioMixerWindow.GUIContents();
   AudioMixerDrawUtils.InitStyles();
   this.DetectControllerChange();
   this.m_GroupViews.OnEvent();
   this.m_SnapshotListView.OnEvent();
   this.DoToolbar();
   List<AudioMixerGroupController> allGroups = !((UnityEngine.Object) this.m_Controller != (UnityEngine.Object) null) ? new List<AudioMixerGroupController>() : this.m_Controller.GetAllAudioGroupsSlow();
   Dictionary<AudioMixerEffectController, AudioMixerGroupController> effectMap = this.GetEffectMap(allGroups);
   this.m_GroupTree.UseScrollView(this.m_LayoutMode == AudioMixerWindow.LayoutMode.Horizontal);
   if (this.m_LayoutMode == AudioMixerWindow.LayoutMode.Horizontal)
     this.LayoutWithStripsOnTop(allGroups, effectMap);
   else
     this.LayoutWithStripsOnRightSideOneScrollBar(allGroups, effectMap);
   if ((double) this.m_LastSize.x != (double) this.position.width || (double) this.m_LastSize.y != (double) this.position.height)
   {
     this.m_RepaintCounter = 2;
     this.m_LastSize = new Vector2(this.position.width, this.position.height);
   }
   this.RepaintIfNeeded();
 }