Example #1
0
    public override void Show(Action <int> closeEvent, float sizeX, float sizeY, float showAnimationTime)
    {
        GUICollider.DisableAllCollider("CMD_ChipReinforced");
        RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        base.HideDLG();
        GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] array = this.ConvertChipList(ChipDataMng.userChipData);
        this.chipList = new ChipList(this.goEFC_FOOTER, 8, new Vector2(960f, 450f), array, false, true);
        this.chipList.SetPosition(new Vector3(-40f, -70f, 0f));
        this.chipList.SetScrollBarPosX(520f);
        this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
        this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
        this.chipList.AddWidgetDepth(base.gameObject.GetComponent <UIWidget>().depth);
        base.PartsTitle.SetTitle(StringMaster.GetString("ChipReinforcement-01"));
        this.sortButtonLabel.text      = StringMaster.GetString("SystemSortButton");
        this.sortNameLabel.text        = CMD_ChipSortModal.GetSortName();
        this.sortButton.CallBackClass  = base.gameObject;
        this.sortButton.MethodToInvoke = "OnSortButton";
        this.messageLabel.gameObject.SetActive(array.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>() == 0);
        this.messageLabel.text = StringMaster.GetString("ChipAdministration-01");
        int num = 0;

        if (ChipDataMng.userChipData != null && ChipDataMng.userChipData.userChipList != null)
        {
            num = ChipDataMng.userChipData.userChipList.Length;
        }
        this.listCountLabel.text = string.Format(StringMaster.GetString("SystemFraction"), num, DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.chipLimitMax);
        base.ShowDLG();
        base.SetTutorialAnyTime("anytime_second_tutorial_chip_reinforcement");
        base.Show(closeEvent, sizeX, sizeY, showAnimationTime);
        RestrictionInput.EndLoad();
    }
    public override void Show(Action <int> f, float sizeX, float sizeY, float aT)
    {
        GUICollider.DisableAllCollider("CMD_ChipList");
        RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        base.HideDLG();
        this.userChipList = this.ConvertChipList(ChipDataMng.userChipData);
        this.chipList     = new ChipList(this.goEFC_FOOTER, 7, new Vector2(960f, 450f), this.userChipList, false, true);
        this.chipList.SetPosition(new Vector3(-110f, -70f, 0f));
        this.chipList.SetScrollBarPosX(450f);
        this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
        this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
        this.chipList.AddWidgetDepth(base.gameObject.GetComponent <UIWidget>().depth);
        this.chipList.SetTouchAreaWidth(875f);
        this.messageLabel.gameObject.SetActive(this.userChipList.Length == 0);
        int num = 0;

        if (ChipDataMng.userChipData != null && ChipDataMng.userChipData.userChipList != null)
        {
            num = ChipDataMng.userChipData.userChipList.Length;
        }
        this.listCountLabel.text          = string.Format(StringMaster.GetString("SystemFraction"), num, DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.chipLimitMax);
        this.saleClusterMessageLabel.text = "0";
        this.sortNameLabel.text           = CMD_ChipSortModal.GetSortName();
        this.UpdateCluster();
        this.ChangeViewMode(CMD_ChipAdministration.ViewModeType.List);
        base.ShowDLG();
        base.SetTutorialAnyTime("anytime_second_tutorial_chip_list");
        base.Show(f, sizeX, sizeY, aT);
        RestrictionInput.EndLoad();
    }
    private void OnSortButton()
    {
        Action <int> callback = delegate(int result)
        {
            if (result > 0)
            {
                this.sortNameLabel.text = CMD_ChipSortModal.GetSortName();
                this.userChipList       = this.ConvertChipList(ChipDataMng.userChipData);
                this.chipList.ReAllBuild(this.userChipList, false, false);
                this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
                this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
                this.messageLabel.gameObject.SetActive(this.userChipList.Length == 0);
                if (this.viewModeType == CMD_ChipAdministration.ViewModeType.Sale)
                {
                    foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList in this.saleUserChipList)
                    {
                        this.chipList.SetSelectColor(userChipList.userChipId, true);
                    }
                    foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList2 in this.userChipList)
                    {
                        if (userChipList2.userMonsterId > 0)
                        {
                            this.chipList.SetSelectColor(userChipList2.userChipId, true);
                        }
                    }
                    for (int j = 0; j < this.saleUserChipList.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>(); j++)
                    {
                        this.chipList.SetSelectMessage(this.saleUserChipList[j].userChipId, (j + 1).ToString());
                    }
                }
            }
        };

        CMD_ChipSortModal.Create(callback);
    }
Example #4
0
 public override void Show(Action <int> f, float sizeX, float sizeY, float aT)
 {
     RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
     base.HideDLG();
     this.SetupLocalize();
     this.SetupChips(ChipDataMng.userChipData);
     this.SetupChipDetail();
     this.SetupAttackButton();
     this.changeViewContentLabel.text = CMD_ChipSortModal.GetSortName();
     base.ShowDLG();
     base.Show(f, sizeX, sizeY, aT);
     RestrictionInput.EndLoad();
 }
Example #5
0
    private void OnSortButton()
    {
        Action <int> callback = delegate(int result)
        {
            global::Debug.Log("result " + result);
            if (result > 0)
            {
                this.sortNameLabel.text = CMD_ChipSortModal.GetSortName();
                GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] array = this.ConvertChipList(ChipDataMng.userChipData);
                this.chipList.ReAllBuild(array, false, false);
                this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
                this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
                this.messageLabel.gameObject.SetActive(array.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>() == 0);
            }
        };

        CMD_ChipSortModal.Create(callback);
    }
Example #6
0
 private void SetupSortUI()
 {
     this.sortInfo.orderByAsc.label.text            = StringMaster.GetString("ChipSortModal-05");
     this.sortInfo.orderByAsc.button.CallBackClass  = base.gameObject;
     this.sortInfo.orderByAsc.button.MethodToInvoke = "OnOrderByAsc";
     this.sortInfo.orderByAsc.SetSelect(this.tempData.isOrderByAsc);
     this.sortInfo.orderByDesc.label.text            = StringMaster.GetString("ChipSortModal-06");
     this.sortInfo.orderByDesc.button.CallBackClass  = base.gameObject;
     this.sortInfo.orderByDesc.button.MethodToInvoke = "OnOrderByDesc";
     this.sortInfo.orderByDesc.SetSelect(!this.tempData.isOrderByAsc);
     CMD_ChipSortModal.SortButtonInfo[] sortContents = this.sortInfo.sortContents;
     for (int i = 0; i < sortContents.Length; i++)
     {
         CMD_ChipSortModal.SortButtonInfo sortButtonInfo = sortContents[i];
         CMD_ChipSortModal.SortType       sortType       = sortButtonInfo.sortType;
         sortButtonInfo.label.text           = CMD_ChipSortModal.GetSortName(sortType);
         sortButtonInfo.button.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
         {
             this.OnSortContentButton(sortType);
         };
         sortButtonInfo.SetSelect(sortType == this.tempData.sortType);
     }
     this.currentSortNameLabel.text = string.Format(StringMaster.GetString("Sort-01"), CMD_ChipSortModal.GetSortName(this.tempData.sortType));
 }
Example #7
0
 public static string GetSortName()
 {
     return(CMD_ChipSortModal.GetSortName(CMD_ChipSortModal.data.sortType));
 }
Example #8
0
 private void OnSortContentButton(CMD_ChipSortModal.SortType sortType)
 {
     this.tempData.sortType = sortType;
     foreach (CMD_ChipSortModal.SortButtonInfo sortButtonInfo in this.sortInfo.sortContents)
     {
         sortButtonInfo.SetSelect(sortButtonInfo.sortType == this.tempData.sortType);
     }
     this.currentSortNameLabel.text = string.Format(StringMaster.GetString("Sort-01"), CMD_ChipSortModal.GetSortName(this.tempData.sortType));
 }