private void OnClickUnlockStamp(int stampId)
    {
        int num = Array.IndexOf(currentFavorite, stampId);

        if (num >= 0)
        {
            if (num != selectFavoriteStampIndex)
            {
                int num2 = currentFavorite[selectFavoriteStampIndex];
                currentFavorite[selectFavoriteStampIndex] = stampId;
                ChatStampListItem component = favoriteIcons[selectFavoriteStampIndex].GetComponent <ChatStampListItem>();
                component.Init(stampId);
                component.GetComponent <UITweenCtrl>().Reset();
                component.GetComponent <UITweenCtrl>().Play(true, null);
                currentFavorite[num] = num2;
                component            = favoriteIcons[num].GetComponent <ChatStampListItem>();
                component.Init(num2);
                component.GetComponent <UITweenCtrl>().Reset();
                component.GetComponent <UITweenCtrl>().Play(true, null);
            }
        }
        else
        {
            currentFavorite[selectFavoriteStampIndex] = stampId;
            ChatStampListItem component2 = favoriteIcons[selectFavoriteStampIndex].GetComponent <ChatStampListItem>();
            component2.Init(stampId);
            component2.GetComponent <UITweenCtrl>().Reset();
            component2.GetComponent <UITweenCtrl>().Play(true, null);
        }
        SetBlocker(true);
    }
    private void InitStampItem(int stampId, Transform iTransform, Action onClick)
    {
        ChatStampListItem component = iTransform.GetComponent <ChatStampListItem>();

        component.Init(stampId);
        component.onButton = onClick;
    }
 private void SetSelectedFavoriteIcon(Transform selectIcon, int stampId)
 {
     //IL_0006: Unknown result type (might be due to invalid IL or missing references)
     //IL_000c: Unknown result type (might be due to invalid IL or missing references)
     selectedIcon.get_transform().set_localPosition(selectIcon.get_localPosition());
     selectedIcon.Init(stampId);
 }
    private void SetStampTextre(int id)
    {
        Transform         ctrl      = GetCtrl(UI.OBJ_STAMP);
        ChatStampListItem component = ctrl.GetComponent <ChatStampListItem>();

        component.Init(id);
    }
Beispiel #5
0
 private void InitStampItem(int index, Transform iTransform, bool isRecycle)
 {
     if (m_StampIdListCanPost != null)
     {
         int stampId            = m_StampIdListCanPost[index];
         ChatStampListItem item = iTransform.GetComponent <ChatStampListItem>();
         item.Init(stampId);
         ChatStampListItem chatStampListItem = item;
         chatStampListItem.onButton = (Action)Delegate.Combine(chatStampListItem.onButton, (Action) delegate
         {
             DispatchEvent("SEND_STAMP", item.StampId);
         });
     }
 }
 private void InitStampItem(int index, Transform iTransform, bool isRecycle)
 {
     if (stampIdListCanUse != null)
     {
         int num = stampIdListCanUse[index];
         ChatStampListItem item = iTransform.GetComponent <ChatStampListItem>();
         item.Init(num);
         if (!isRecycle)
         {
             if (num == createRequest.stampId)
             {
                 SetStampTextre(item.StampId);
             }
             ChatStampListItem chatStampListItem = item;
             chatStampListItem.onButton = (Action)Delegate.Combine(chatStampListItem.onButton, (Action) delegate
             {
                 SelectStamp(item.StampId);
             });
         }
     }
 }