// 为好友分组添加PopupMenu
        private void addPopupMenuForBuddyGroup(int buddyGroupID)
        {
            // 添加PopupAction
            popupMenuHandle = BuddyGroupTrans.gameObject.GetComponent <UPopupMenuHandle>();
            if (popupMenuHandle != null)
            {
                popupMenuHandle.HandlePopupAction.Clear();

                UPopupAction popupAction = new UPopupAction();

                popupAction.Add(UPopupItemDataAddBuddyGroup.GetDescString(), new UPopupItemDataAddBuddyGroup());
                // 非系统默认的分组才可以编辑名字和删除
                if (!DataCenter.SNSDataManager.isDefaultBuddyGroup(buddyGroupID))
                {
                    popupAction.Add(UPopupItemDataUpdateBuddyGroupName.GetDescString(), new UPopupItemDataUpdateBuddyGroupName(buddyGroupID));
                    popupAction.Add(UPopupItemDataDelBuddyGroup.GetDescString(), new UPopupItemDataDelBuddyGroup(buddyGroupID));
                }

                popupMenuHandle.HandlePopupAction = popupAction;
            }
        }
Beispiel #2
0
 void Start()
 {
     handle = GetComponent <UPopupMenuHandle>();
     handle.HandlePopupAction = HandlePopupAction;
 }