private void GirdItemPopupMenuAction(GridItem item) { GenericMenu g = new GenericMenu(); g.AddItem(new GUIContent("Ping Item"), false, () => { m_GridViewGroup.GetGridView().BeginPing(item.Id); }); g.AddItem(new GUIContent("Add Child"), false, () => { var item1 = new GenericGridItem() { DisplayName = "new Item1", }; AddGridItemChild(item, item1); }); g.ShowAsContext(); }
private void GridViewPopupMenuAction() { GenericMenu g = new GenericMenu(); g.AddItem(new GUIContent("AddItem"), false, () => { var item = new GenericGridItem1() { DisplayName = "new Item", }; AddGridItem(item); }); g.AddItem(new GUIContent("AddItem1"), false, () => { var item = new GenericGridItem() { DisplayName = "new Item1", }; AddGridItem(item); }); g.ShowAsContext(); }