public void AllBuild(int widthLength, Vector2 windowSize, GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] dataList, bool shouldDim = false, bool isInitLocation = false)
    {
        Rect  listWindowViewRect = default(Rect);
        float num  = windowSize.x * 0.5f;
        float num2 = windowSize.y * 0.5f;

        listWindowViewRect.xMin    = -num;
        listWindowViewRect.xMax    = num;
        listWindowViewRect.yMin    = -num2 - GUIMain.VerticalSpaceSize;
        listWindowViewRect.yMax    = num2 + GUIMain.VerticalSpaceSize;
        base.ListWindowViewRect    = listWindowViewRect;
        this.fRecycleViewMaxY      = num2 * 1.5f;
        this.fRecycleViewMinY      = -num2 * 1.5f;
        this.PARTS_CT_MN           = widthLength;
        this.RecycleViewSectorSize = 4;
        List <string> myDigimonChipGroupIds = null;

        if (shouldDim)
        {
            myDigimonChipGroupIds = CMD_ChipSphere.DataChg.GetChipEquip().GetChipGroupList();
        }
        GUISelectPanelChipList.partsDataList = new List <GUIListChipParts.Data>();
        for (int i = 0; i < dataList.Length; i++)
        {
            GUIListChipParts.Data data = new GUIListChipParts.Data();
            data.index                 = i;
            data.userChip              = dataList[i];
            data.masterChip            = ChipDataMng.GetChipMainData(dataList[i].chipId.ToString());
            data.shouldDim             = shouldDim;
            data.myDigimonChipGroupIds = myDigimonChipGroupIds;
            GUISelectPanelChipList.partsDataList.Add(data);
        }
        base.initLocation = isInitLocation;
        base.AllBuild(dataList.Length, isInitLocation, 1f, 1f, null, null, true);
    }
 private void OnShortTouchChip(GUIListChipParts.Data data)
 {
     if (this.viewModeType == CMD_ChipAdministration.ViewModeType.List)
     {
         CMD_QuestItemPOP.Create(data.masterChip);
     }
     else
     {
         if (data.userChip.userMonsterId > 0)
         {
             return;
         }
         if (this.saleUserChipList.Contains(data.userChip))
         {
             this.totalPrice -= data.masterChip.GetSellPrice();
             this.saleClusterMessageLabel.text = StringFormat.Cluster(this.totalPrice);
             if (this.saleUserChipList.Count >= 10)
             {
                 foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList in this.userChipList)
                 {
                     this.chipList.SetSelectColor(userChipList.userChipId, userChipList.userMonsterId > 0);
                 }
                 foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList2 in this.saleUserChipList)
                 {
                     this.chipList.SetSelectColor(userChipList2.userChipId, true);
                 }
             }
             this.saleUserChipList.Remove(data.userChip);
             this.chipList.SetSelectColor(data.userChip.userChipId, false);
             this.chipList.SetAllSelectMessage(string.Empty);
             for (int j = 0; j < this.saleUserChipList.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>(); j++)
             {
                 this.chipList.SetSelectMessage(this.saleUserChipList[j].userChipId, (j + 1).ToString());
             }
         }
         else if (this.saleUserChipList.Count < 10)
         {
             this.totalPrice += data.masterChip.GetSellPrice();
             this.saleClusterMessageLabel.text = StringFormat.Cluster(this.totalPrice);
             this.saleUserChipList.Add(data.userChip);
             this.chipList.SetSelectColor(data.userChip.userChipId, true);
             this.chipList.SetAllSelectMessage(string.Empty);
             for (int k = 0; k < this.saleUserChipList.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>(); k++)
             {
                 this.chipList.SetSelectMessage(this.saleUserChipList[k].userChipId, (k + 1).ToString());
             }
             if (this.saleUserChipList.Count >= 10)
             {
                 this.chipList.SetAllSelectColor(true);
             }
         }
         this.EnableSaleDecisionButton(this.saleUserChipList.Count > 0);
     }
 }
예제 #3
0
    private void OnShortTouchChip(GUIListChipParts.Data data)
    {
        Action <int> callback = delegate(int result)
        {
            if (result > 0)
            {
                this.Send(data.userChip);
            }
        };

        CMD_ChipReinforcementModal.Create(data.userChip, callback);
    }
 private void OnLongTouchChip(GUIListChipParts.Data data)
 {
     global::Debug.LogWarning("LongTouch " + data.userChip.userChipId);
     if (this.viewModeType == CMD_ChipAdministration.ViewModeType.List)
     {
         CMD_QuestItemPOP.Create(data.masterChip);
     }
     else
     {
         CMD_QuestItemPOP.Create(data.masterChip);
     }
 }
예제 #5
0
    private void OnShortTouchChip(GUIListChipParts.Data data)
    {
        this.chipList.SetSelectColor(this.selectedUserChipId, false);
        this.chipList.SetNowSelectMessage(this.selectedUserChipId, false);
        int userChipId = data.userChip.userChipId;

        this.chipList.SetSelectColor(userChipId, true);
        this.chipList.SetNowSelectMessage(userChipId, true);
        this.selectedUserChipId = data.userChip.userChipId;
        this.selectedChip       = data.masterChip;
        global::Debug.LogWarning("ShortTouch " + data.userChip.userChipId);
        this.SetupAttackButton();
        this.SetupChipDetail();
    }
예제 #6
0
 private void OnLongTouchChip(GUIListChipParts.Data data)
 {
     global::Debug.LogWarning("LongTouch " + data.userChip.userChipId);
     CMD_QuestItemPOP.Create(data.masterChip);
 }
예제 #7
0
 private void OnLongTouchChip(GUIListChipParts.Data data)
 {
     CMD_QuestItemPOP.Create(data.masterChip);
 }
 public override void SetData()
 {
     this.data = GUISelectPanelChipList.partsDataList[base.IDX];
 }
 public void SetData(GUIListChipParts.Data dt)
 {
     this.data = dt;
 }