private static void ShowBusPopupMenu(int effectIndex, AudioMixerGroupController group, List <AudioMixerGroupController> allGroups, Dictionary <AudioMixerEffectController, AudioMixerGroupController> effectMap, AudioMixerEffectController effect, Rect buttonRect)
        {
            GenericMenu genericMenu = new GenericMenu();

            genericMenu.AddItem(new GUIContent("None"), false, new GenericMenu.MenuFunction2(AudioMixerChannelStripView.ConnectSendPopupCallback), new AudioMixerChannelStripView.ConnectSendContext(effect, null));
            genericMenu.AddSeparator(string.Empty);
            AudioMixerChannelStripView.AddMenuItemsForReturns(genericMenu, string.Empty, effectIndex, group, allGroups, effectMap, effect, true);
            if (genericMenu.GetItemCount() == 2)
            {
                genericMenu.AddDisabledItem(new GUIContent("No valid Receive targets found"));
            }
            genericMenu.DropDown(buttonRect);
        }
        private static void ShowBusPopupMenu(int effectIndex, AudioMixerGroupController group, List <AudioMixerGroupController> allGroups, Dictionary <AudioMixerEffectController, AudioMixerGroupController> effectMap, AudioMixerEffectController effect, Rect buttonRect)
        {
            GenericMenu pm = new GenericMenu();

            pm.AddItem(EditorGUIUtility.TrTextContent("None"), false, AudioMixerChannelStripView.ConnectSendPopupCallback, new AudioMixerChannelStripView.ConnectSendContext(effect, null));
            pm.AddSeparator("");
            AudioMixerChannelStripView.AddMenuItemsForReturns(pm, string.Empty, effectIndex, group, allGroups, effectMap, effect, true);

            if (pm.GetItemCount() == 2)
            {
                pm.AddDisabledItem(EditorGUIUtility.TrTextContent("No valid Receive targets found"));
            }

            pm.DropDown(buttonRect);
        }
Пример #3
0
        private static void ShowBusPopupMenu(int effectIndex, AudioMixerGroupController group, List <AudioMixerGroupController> allGroups, Dictionary <AudioMixerEffectController, AudioMixerGroupController> effectMap, AudioMixerEffectController effect, Rect buttonRect)
        {
            GenericMenu genericMenu = new GenericMenu();
            GenericMenu arg_3A_0    = genericMenu;
            GUIContent  arg_3A_1    = EditorGUIUtility.TrTextContent("None", null, null);
            bool        arg_3A_2    = false;

            if (AudioMixerEffectView.< > f__mg$cache0 == null)
            {
                AudioMixerEffectView.< > f__mg$cache0 = new GenericMenu.MenuFunction2(AudioMixerChannelStripView.ConnectSendPopupCallback);
            }
            arg_3A_0.AddItem(arg_3A_1, arg_3A_2, AudioMixerEffectView.< > f__mg$cache0, new AudioMixerChannelStripView.ConnectSendContext(effect, null));
            genericMenu.AddSeparator("");
            AudioMixerChannelStripView.AddMenuItemsForReturns(genericMenu, string.Empty, effectIndex, group, allGroups, effectMap, effect, true);
            if (genericMenu.GetItemCount() == 2)
            {
                genericMenu.AddDisabledItem(EditorGUIUtility.TrTextContent("No valid Receive targets found", null, null));
            }
            genericMenu.DropDown(buttonRect);
        }