public void PopupGenericMenu(EditorWindow view, Rect pos) { GenericMenu menu = new GenericMenu(); IHasCustomMenu menu2 = view as IHasCustomMenu; if (menu2 != null) { menu2.AddItemsToMenu(menu); } this.AddDefaultItemsToMenu(menu, view); menu.DropDown(pos); Event.current.Use(); }
public void PopupGenericMenu(EditorWindow view, Rect pos) { GenericMenu menu = new GenericMenu(); IHasCustomMenu menuProviderFactoryThingy = view as IHasCustomMenu; if (menuProviderFactoryThingy != null) { menuProviderFactoryThingy.AddItemsToMenu(menu); } AddDefaultItemsToMenu(menu, view); menu.DropDown(pos); Event.current.Use(); }
public void PopupGenericMenu(EditorWindow view, Rect pos) { GenericMenu menu = new GenericMenu(); IHasCustomMenu menuProvider = view as IHasCustomMenu; if (menuProvider != null) { menuProvider.AddItemsToMenu(menu); } AddDefaultItemsToMenu(menu, view); if (view != null) { AddWindowActionMenu(menu, view); } menu.DropDown(pos); Event.current.Use(); }