Example #1
0
            public static void Show(Rect buttonRect, int viewIndex, AudioMixerGroupViewList list)
            {
                GenericMenu genericMenu = new GenericMenu();

                AudioMixerGroupViewList.ViewsContexttMenu.data data = new AudioMixerGroupViewList.ViewsContexttMenu.data()
                {
                    viewIndex = viewIndex, list = list
                };
                genericMenu.AddItem(new GUIContent("Rename"), false, new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Rename), (object)data);
                genericMenu.AddItem(new GUIContent("Duplicate"), false, new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Duplicate), (object)data);
                genericMenu.AddItem(new GUIContent("Delete"), false, new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Delete), (object)data);
                genericMenu.DropDown(buttonRect);
            }
			public static void Show(Rect buttonRect, int viewIndex, AudioMixerGroupViewList list)
			{
				GenericMenu genericMenu = new GenericMenu();
				AudioMixerGroupViewList.ViewsContexttMenu.data userData = new AudioMixerGroupViewList.ViewsContexttMenu.data
				{
					viewIndex = viewIndex,
					list = list
				};
				genericMenu.AddItem(new GUIContent("Rename"), false, new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Rename), userData);
				genericMenu.AddItem(new GUIContent("Duplicate"), false, new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Duplicate), userData);
				genericMenu.AddItem(new GUIContent("Delete"), false, new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Delete), userData);
				genericMenu.DropDown(buttonRect);
			}
Example #3
0
            static public void Show(Rect buttonRect, int viewIndex, AudioMixerGroupViewList list)
            {
                var  menu  = new GenericMenu();
                data input = new data()
                {
                    viewIndex = viewIndex, list = list
                };

                menu.AddItem(EditorGUIUtility.TrTextContent("Rename"), false, Rename, input);
                menu.AddItem(EditorGUIUtility.TrTextContent("Duplicate"), false, Duplicate, input);
                menu.AddItem(EditorGUIUtility.TrTextContent("Delete"), false, Delete, input);

                menu.DropDown(buttonRect);
            }
            /*
             * [CompilerGenerated]
             * private static GenericMenu.MenuFunction2 <>f__mg$cache0;
             *
             * [CompilerGenerated]
             * private static GenericMenu.MenuFunction2 <>f__mg$cache1;
             *
             * [CompilerGenerated]
             * private static GenericMenu.MenuFunction2 <>f__mg$cache2;
             */

            public static void Show(Rect buttonRect, int viewIndex, AudioMixerGroupViewList list)
            {
                GenericMenu genericMenu = new GenericMenu();

                AudioMixerGroupViewList.ViewsContexttMenu.data userData = new AudioMixerGroupViewList.ViewsContexttMenu.data
                {
                    viewIndex = viewIndex,
                    list      = list
                };
                GenericMenu arg_49_0 = genericMenu;
                GUIContent  arg_49_1 = EditorGUIUtility.TrTextContent("Rename", null, null);
                bool        arg_49_2 = false;

                /*
                 * if (AudioMixerGroupViewList.ViewsContexttMenu.<>f__mg$cache0 == null)
                 * {
                 *      AudioMixerGroupViewList.ViewsContexttMenu.<>f__mg$cache0 = new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Rename);
                 * }
                 * arg_49_0.AddItem(arg_49_1, arg_49_2, AudioMixerGroupViewList.ViewsContexttMenu.<>f__mg$cache0, userData);
                 */
                GenericMenu arg_7A_0 = genericMenu;
                GUIContent  arg_7A_1 = EditorGUIUtility.TrTextContent("Duplicate", null, null);
                bool        arg_7A_2 = false;

                /*
                 * if (AudioMixerGroupViewList.ViewsContexttMenu.<>f__mg$cache1 == null)
                 * {
                 *      AudioMixerGroupViewList.ViewsContexttMenu.<>f__mg$cache1 = new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Duplicate);
                 * }
                 * arg_7A_0.AddItem(arg_7A_1, arg_7A_2, AudioMixerGroupViewList.ViewsContexttMenu.<>f__mg$cache1, userData);
                 */
                GenericMenu arg_AB_0 = genericMenu;
                GUIContent  arg_AB_1 = EditorGUIUtility.TrTextContent("Delete", null, null);
                bool        arg_AB_2 = false;

                /*
                 * if (AudioMixerGroupViewList.ViewsContexttMenu.<>f__mg$cache2 == null)
                 * {
                 *      AudioMixerGroupViewList.ViewsContexttMenu.<>f__mg$cache2 = new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Delete);
                 * }
                 * arg_AB_0.AddItem(arg_AB_1, arg_AB_2, AudioMixerGroupViewList.ViewsContexttMenu.<>f__mg$cache2, userData);
                 */
                genericMenu.DropDown(buttonRect);
            }
            public static void Show(Rect buttonRect, int viewIndex, AudioMixerGroupViewList list)
            {
                GenericMenu genericMenu = new GenericMenu();

                AudioMixerGroupViewList.ViewsContexttMenu.data userData = new AudioMixerGroupViewList.ViewsContexttMenu.data
                {
                    viewIndex = viewIndex,
                    list      = list
                };
                GenericMenu arg_47_0 = genericMenu;
                GUIContent  arg_47_1 = new GUIContent("Rename");
                bool        arg_47_2 = false;

                if (AudioMixerGroupViewList.ViewsContexttMenu.< > f__mg$cache0 == null)
                {
                    AudioMixerGroupViewList.ViewsContexttMenu.< > f__mg$cache0 = new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Rename);
                }
                arg_47_0.AddItem(arg_47_1, arg_47_2, AudioMixerGroupViewList.ViewsContexttMenu.< > f__mg$cache0, userData);
                GenericMenu arg_76_0 = genericMenu;
                GUIContent  arg_76_1 = new GUIContent("Duplicate");
                bool        arg_76_2 = false;

                if (AudioMixerGroupViewList.ViewsContexttMenu.< > f__mg$cache1 == null)
                {
                    AudioMixerGroupViewList.ViewsContexttMenu.< > f__mg$cache1 = new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Duplicate);
                }
                arg_76_0.AddItem(arg_76_1, arg_76_2, AudioMixerGroupViewList.ViewsContexttMenu.< > f__mg$cache1, userData);
                GenericMenu arg_A5_0 = genericMenu;
                GUIContent  arg_A5_1 = new GUIContent("Delete");
                bool        arg_A5_2 = false;

                if (AudioMixerGroupViewList.ViewsContexttMenu.< > f__mg$cache2 == null)
                {
                    AudioMixerGroupViewList.ViewsContexttMenu.< > f__mg$cache2 = new GenericMenu.MenuFunction2(AudioMixerGroupViewList.ViewsContexttMenu.Delete);
                }
                arg_A5_0.AddItem(arg_A5_1, arg_A5_2, AudioMixerGroupViewList.ViewsContexttMenu.< > f__mg$cache2, userData);
                genericMenu.DropDown(buttonRect);
            }
 private void Init()
 {
     if (!this.m_Initialized)
     {
         if (this.m_LayoutStripsOnTop == null)
         {
             this.m_LayoutStripsOnTop = new AudioMixerWindow.Layout();
         }
         if (this.m_LayoutStripsOnTop.m_VerticalSplitter == null || this.m_LayoutStripsOnTop.m_VerticalSplitter.realSizes.Length != 2)
         {
             this.m_LayoutStripsOnTop.m_VerticalSplitter = new SplitterState(new int[]
             {
                 65,
                 35
             }, new int[]
             {
                 85,
                 105
             }, null);
         }
         if (this.m_LayoutStripsOnTop.m_HorizontalSplitter == null || this.m_LayoutStripsOnTop.m_HorizontalSplitter.realSizes.Length != 4)
         {
             this.m_LayoutStripsOnTop.m_HorizontalSplitter = new SplitterState(new int[]
             {
                 60,
                 60,
                 60,
                 60
             }, new int[]
             {
                 85,
                 85,
                 85,
                 85
             }, null);
         }
         if (this.m_LayoutStripsOnRight == null)
         {
             this.m_LayoutStripsOnRight = new AudioMixerWindow.Layout();
         }
         if (this.m_LayoutStripsOnRight.m_HorizontalSplitter == null || this.m_LayoutStripsOnRight.m_HorizontalSplitter.realSizes.Length != 2)
         {
             this.m_LayoutStripsOnRight.m_HorizontalSplitter = new SplitterState(new int[]
             {
                 30,
                 70
             }, new int[]
             {
                 160,
                 160
             }, null);
         }
         if (this.m_LayoutStripsOnRight.m_VerticalSplitter == null || this.m_LayoutStripsOnRight.m_VerticalSplitter.realSizes.Length != 4)
         {
             this.m_LayoutStripsOnRight.m_VerticalSplitter = new SplitterState(new int[]
             {
                 60,
                 60,
                 60,
                 60
             }, new int[]
             {
                 100,
                 85,
                 85,
                 85
             }, null);
         }
         if (this.m_AudioGroupTreeState == null)
         {
             this.m_AudioGroupTreeState = new TreeViewState();
         }
         this.m_GroupTree = new AudioMixerGroupTreeView(this, this.m_AudioGroupTreeState);
         if (this.m_MixersTreeState == null)
         {
             this.m_MixersTreeState = new TreeViewStateWithAssetUtility();
         }
         this.m_MixersTree = new AudioMixersTreeView(this, this.m_MixersTreeState, new Func <List <AudioMixerController> >(this.GetAllControllers));
         if (this.m_ViewsState == null)
         {
             this.m_ViewsState = new ReorderableListWithRenameAndScrollView.State();
         }
         this.m_GroupViews = new AudioMixerGroupViewList(this.m_ViewsState);
         if (this.m_SnapshotState == null)
         {
             this.m_SnapshotState = new ReorderableListWithRenameAndScrollView.State();
         }
         this.m_SnapshotListView = new AudioMixerSnapshotListView(this.m_SnapshotState);
         if (this.m_ChannelStripViewState == null)
         {
             this.m_ChannelStripViewState = new AudioMixerChannelStripView.State();
         }
         this.m_ChannelStripView = new AudioMixerChannelStripView(this.m_ChannelStripViewState);
         this.OnMixerControllerChanged();
         this.m_Initialized = true;
     }
 }
		private void Init()
		{
			if (this.m_Initialized)
			{
				return;
			}
			if (this.m_LayoutStripsOnTop == null)
			{
				this.m_LayoutStripsOnTop = new AudioMixerWindow.Layout();
			}
			if (this.m_LayoutStripsOnTop.m_VerticalSplitter == null || this.m_LayoutStripsOnTop.m_VerticalSplitter.realSizes.Length != 2)
			{
				this.m_LayoutStripsOnTop.m_VerticalSplitter = new SplitterState(new int[]
				{
					65,
					35
				}, new int[]
				{
					85,
					105
				}, null);
			}
			if (this.m_LayoutStripsOnTop.m_HorizontalSplitter == null || this.m_LayoutStripsOnTop.m_HorizontalSplitter.realSizes.Length != 4)
			{
				this.m_LayoutStripsOnTop.m_HorizontalSplitter = new SplitterState(new int[]
				{
					60,
					60,
					60,
					60
				}, new int[]
				{
					85,
					85,
					85,
					85
				}, null);
			}
			if (this.m_LayoutStripsOnRight == null)
			{
				this.m_LayoutStripsOnRight = new AudioMixerWindow.Layout();
			}
			if (this.m_LayoutStripsOnRight.m_HorizontalSplitter == null || this.m_LayoutStripsOnRight.m_HorizontalSplitter.realSizes.Length != 2)
			{
				this.m_LayoutStripsOnRight.m_HorizontalSplitter = new SplitterState(new int[]
				{
					30,
					70
				}, new int[]
				{
					160,
					160
				}, null);
			}
			if (this.m_LayoutStripsOnRight.m_VerticalSplitter == null || this.m_LayoutStripsOnRight.m_VerticalSplitter.realSizes.Length != 4)
			{
				this.m_LayoutStripsOnRight.m_VerticalSplitter = new SplitterState(new int[]
				{
					60,
					60,
					60,
					60
				}, new int[]
				{
					100,
					85,
					85,
					85
				}, null);
			}
			if (this.m_AudioGroupTreeState == null)
			{
				this.m_AudioGroupTreeState = new TreeViewState();
			}
			this.m_GroupTree = new AudioMixerGroupTreeView(this, this.m_AudioGroupTreeState);
			if (this.m_MixersTreeState == null)
			{
				this.m_MixersTreeState = new TreeViewState();
			}
			this.m_MixersTree = new AudioMixersTreeView(this, this.m_MixersTreeState, new Func<List<AudioMixerController>>(this.GetAllControllers));
			if (this.m_ViewsState == null)
			{
				this.m_ViewsState = new ReorderableListWithRenameAndScrollView.State();
			}
			this.m_GroupViews = new AudioMixerGroupViewList(this.m_ViewsState);
			if (this.m_SnapshotState == null)
			{
				this.m_SnapshotState = new ReorderableListWithRenameAndScrollView.State();
			}
			this.m_SnapshotListView = new AudioMixerSnapshotListView(this.m_SnapshotState);
			if (this.m_ChannelStripViewState == null)
			{
				this.m_ChannelStripViewState = new AudioMixerChannelStripView.State();
			}
			this.m_ChannelStripView = new AudioMixerChannelStripView(this.m_ChannelStripViewState);
			this.OnMixerControllerChanged();
			this.m_Initialized = true;
		}
        void Init()
        {
            if (m_Initialized)
            {
                return;
            }

            if (m_LayoutStripsOnTop == null)
            {
                m_LayoutStripsOnTop = new Layout();
            }

            if (m_LayoutStripsOnTop.m_VerticalSplitter == null || m_LayoutStripsOnTop.m_VerticalSplitter.realSizes.Length != 2)
            {
                m_LayoutStripsOnTop.m_VerticalSplitter = SplitterState.FromAbsolute(new float[] { 65, 35 }, new float[] { 85, 105 }, null);
            }

            if (m_LayoutStripsOnTop.m_HorizontalSplitter == null || m_LayoutStripsOnTop.m_HorizontalSplitter.realSizes.Length != 4)
            {
                m_LayoutStripsOnTop.m_HorizontalSplitter = SplitterState.FromAbsolute(new float[] { 60, 60, 60, 60 }, new float[] { 85, 85, 85, 85 }, null);
            }

            if (m_LayoutStripsOnRight == null)
            {
                m_LayoutStripsOnRight = new Layout();
            }

            if (m_LayoutStripsOnRight.m_HorizontalSplitter == null || m_LayoutStripsOnRight.m_HorizontalSplitter.realSizes.Length != 2)
            {
                m_LayoutStripsOnRight.m_HorizontalSplitter = SplitterState.FromAbsolute(new float[] { 30, 70 }, new float[] { 160, 160 }, null);
            }

            if (m_LayoutStripsOnRight.m_VerticalSplitter == null || m_LayoutStripsOnRight.m_VerticalSplitter.realSizes.Length != 4)
            {
                m_LayoutStripsOnRight.m_VerticalSplitter = SplitterState.FromAbsolute(new float[] { 60, 60, 60, 60 }, new float[] { 100, 85, 85, 85 }, null);
            }

            if (m_AudioGroupTreeState == null)
            {
                m_AudioGroupTreeState = new TreeViewState();
            }
            m_GroupTree = new AudioMixerGroupTreeView(this, m_AudioGroupTreeState);

            if (m_MixersTreeState == null)
            {
                m_MixersTreeState = new TreeViewStateWithAssetUtility();
            }
            m_MixersTree = new AudioMixersTreeView(this, m_MixersTreeState, GetAllControllers);

            if (m_ViewsState == null)
            {
                m_ViewsState = new ReorderableListWithRenameAndScrollView.State();
            }
            m_GroupViews = new AudioMixerGroupViewList(m_ViewsState);

            if (m_SnapshotState == null)
            {
                m_SnapshotState = new ReorderableListWithRenameAndScrollView.State();
            }
            m_SnapshotListView = new AudioMixerSnapshotListView(m_SnapshotState);

            if (m_ChannelStripViewState == null)
            {
                m_ChannelStripViewState = new AudioMixerChannelStripView.State();
            }
            m_ChannelStripView = new AudioMixerChannelStripView(m_ChannelStripViewState);

            OnMixerControllerChanged();

            m_Initialized = true;
        }