Ejemplo n.º 1
0
        public static EventWindow Launch()
        {
            EventWindow window = GetWindow <EventWindow>();

            window.Show();

            return(window);
        }
Ejemplo n.º 2
0
        protected override void OnContext(InMusicNode node)
        {
            var menu = new GenericMenu();

            menu.AddDisabledItem(new GUIContent(node._name));
            menu.AddSeparator("");
            if (node.IsRootOrFolder)
            {
                menu.AddItem(new GUIContent("Create Folder"), false, () => CreateFolder(node));
                menu.AddItem(new GUIContent("Create Music Group"), false, () => CreateMusicGroup(node));
            }
            else
            {
                menu.AddDisabledItem(new GUIContent("Create Folder"));
                menu.AddItem(new GUIContent("Create Music Group"), false, () => CreateMusicGroup(node));
            }
            menu.AddSeparator("");

            #region Send to event


            if (node.IsRootOrFolder)
            {
                menu.AddItem(new GUIContent("Create child folder in new prefab"), false, obj =>
                {
                    CreateFolderInNewPrefab(node);
                }, node);
            }

            #endregion

            #region Send to event


            if (!node.IsRootOrFolder)
            {
                menu.AddItem(new GUIContent("Send to Event Window"), false, () => EventWindow.Launch().ReceiveNode(node as InMusicGroup));
            }
            else
            {
                menu.AddDisabledItem(new GUIContent("Send to Event Window"));
            }

            #endregion

            menu.AddSeparator("");

            if (node.IsRoot)
            {
                menu.AddDisabledItem(new GUIContent("Delete"));
            }
            else
            {
                menu.AddItem(new GUIContent("Delete"), false, () => DeleteNode(node));
            }

            menu.ShowAsContext();
        }
Ejemplo n.º 3
0
 public static EventWindow ShowEventWindow()
 {
     return(EventWindow.Launch());
 }
Ejemplo n.º 4
0
 private static void ShowEventWindow()
 {
     EventWindow.Launch();
 }
Ejemplo n.º 5
0
 public AudioEventCreatorGUI(EventWindow window)
     : base(window)
 {
 }