コード例 #1
0
 void hideHightLight()
 {
     for (int i = 0; i < m_GridTranForm.childCount; i++)
     {
         RelationNameListItem item = m_GridTranForm.GetChild(i).GetComponent <RelationNameListItem>();
         if (item != null)
         {
             item.hideHightLight();
         }
     }
 }
コード例 #2
0
 void UpdateRestaurantVisitState()
 {
     for (int i = 0; i < m_GridTranForm.childCount; i++)
     {
         RelationNameListItem item = m_GridTranForm.GetChild(i).GetComponent <RelationNameListItem>();
         if (item != null)
         {
             item.UpdateRestaurantVisitState();
         }
     }
 }
コード例 #3
0
 void SetRestaurantInfo()
 {
     for (int i = 0; i < m_GridTranForm.childCount; i++)
     {
         RelationNameListItem item = m_GridTranForm.GetChild(i).GetComponent <RelationNameListItem>();
         {
             if (item != null)
             {
                 item.SetRestaurantItemInfo();
             }
         }
     }
 }
コード例 #4
0
    public static RelationNameListItem CreateItem(GameObject grid, GameObject resItem, string name, RelationNamePopController parentWindow, Relation relationData)
    {
        GameObject curItem = Utils.BindObjToParent(resItem, grid);

        if (null == curItem)
        {
            LogModule.ErrorLog("CreateItem, curItem error!");
        }
        curItem.name = name;
        RelationNameListItem curItemComponent = curItem.GetComponent <RelationNameListItem>();

        if (null == curItemComponent)
        {
            LogModule.ErrorLog("relation list item error!");
            ResourceManager.DestroyResource(ref curItem);
            return(null);
        }

        curItemComponent.SetData(parentWindow, relationData);
        return(curItemComponent);
    }
コード例 #5
0
    public void OnItemClick(RelationNameListItem curItem)
    {
        if (m_bPopWindow)
        {
            m_bRestaurantFriend = false;
            UIManager.CloseUI(UIInfo.RelationNamePopWindow);
        }

        if (null != m_delChooseName)
        {
            ulong curID = 0;
            if (ulong.TryParse(curItem.gameObject.name, out curID))
            {
                Dictionary <ulong, Relation> relationList = GameManager.gameManager.PlayerDataPool.FriendList.RelationDataList;

                m_delChooseName(curID, relationList[curID].Name);
            }
        }


        hideHightLight();
    }
コード例 #6
0
    void OnLoadItem(GameObject resItem, object param)
    {
        if (null == resItem)
        {
            LogModule.ErrorLog("load RelationNameListItem fail");
            return;
        }
        Utils.CleanGrid(ListGrid);
        Dictionary <ulong, Relation> relationList = GameManager.gameManager.PlayerDataPool.FriendList.RelationDataList;

        foreach (ulong key in relationList.Keys)
        {
            RelationNameListItem.CreateItem(ListGrid, resItem, key.ToString(), this, relationList[key]);
            if (m_bRestaurantFriend)
            {
                SetRestaurantInfo();
                UpdateRestaurantVisitState();
            }
        }
        ListGrid.GetComponent <UIGrid>().Reposition();
        ListGrid.GetComponent <UITopGrid>().Recenter(true);
    }