Пример #1
0
        public void OnOkButtonCallBack()
        {
            bool flag  = this._ventureData.StaminaCost <= Singleton <PlayerModule> .Instance.playerData.stamina;
            bool flag2 = Singleton <IslandModule> .Instance.GetVentureInProgressNum() < (Singleton <IslandModule> .Instance.GetCabinDataByType(5) as CabinVentureDataItem).GetMaxVentureNumInProgress();

            if ((this._isConditionMatch && flag) && flag2)
            {
                Singleton <NetworkManager> .Instance.RequestDispatchIslandVenture(this._ventureData.VentureID, this._ventureData.selectedAvatarList);
            }
            else
            {
                GeneralDialogContext context;
                if (!this._isConditionMatch)
                {
                    context = new GeneralDialogContext {
                        title = LocalizationGeneralLogic.GetText("Menu_Tips", new object[0]),
                        desc  = LocalizationGeneralLogic.GetText("Menu_Desc_ConditionNotMatchHint", new object[0])
                    };
                    Singleton <MainUIManager> .Instance.ShowDialog(context, UIType.Any);
                }
                else if (!flag2)
                {
                    context = new GeneralDialogContext {
                        title = LocalizationGeneralLogic.GetText("Menu_Tips", new object[0]),
                        desc  = LocalizationGeneralLogic.GetText("Menu_Desc_VentureInProgressExceedLimit", new object[0]),
                        type  = GeneralDialogContext.ButtonType.SingleButton
                    };
                    Singleton <MainUIManager> .Instance.ShowDialog(context, UIType.Any);
                }
                else if (!flag)
                {
                    Singleton <PlayerModule> .Instance.playerData._cacheDataUtil.CheckCacheValidAndGo <PlayerStaminaExchangeInfo>(ECacheData.Stamina, NotifyTypes.ShowStaminaExchangeInfo2);
                }
            }
        }
Пример #2
0
        public void OnSkipBtnClicked()
        {
            if (this.SkipVideoClickedCallback != null)
            {
                this.SkipVideoClickedCallback();
            }
            GeneralDialogContext context = new GeneralDialogContext {
                type  = GeneralDialogContext.ButtonType.DoubleButton,
                title = LocalizationGeneralLogic.GetText("SkipCG_Confirm_Title", new object[0]),
                desc  = LocalizationGeneralLogic.GetText("SkipCG_Confirm_Content", new object[0]),
                notDestroyAfterTouchBG  = false,
                notDestroyAfterCallback = false,
                buttonCallBack          = delegate(bool confirmed) {
                    if (confirmed)
                    {
                        if (this.SkipVideoConfirmCallback != null)
                        {
                            base.view.transform.Find("SkipBtn").gameObject.SetActive(false);
                            this._skipBtnState = SkipButtonState.Close;
                            this.SkipVideoConfirmCallback();
                        }
                    }
                    else if (this.SkipVideoCancelCallback != null)
                    {
                        this.SkipVideoCancelCallback();
                    }
                }
            };

            this._currentGeneralDialog = context;
            Singleton <MainUIManager> .Instance.ShowDialog(this._currentGeneralDialog, UIType.Any);
        }
Пример #3
0
        public void OnLvUpBtnClick()
        {
            PlayerDataItem playerData = Singleton <PlayerModule> .Instance.playerData;
            bool           flag       = Singleton <StorageModule> .Instance.GetAllAvatarExpAddMaterial().Count > 0;

            bool flag2 = (this._avatarData.level < playerData.AvatarLevelLimit) || (this._avatarData.exp < this._avatarData.MaxExp);

            if (flag && flag2)
            {
                Singleton <MainUIManager> .Instance.ShowDialog(new MaterialUseDialogContext(this._avatarData), UIType.Any);
            }
            else
            {
                string text = LocalizationGeneralLogic.GetText("Err_Unknown", new object[0]);
                if (!flag)
                {
                    text = LocalizationGeneralLogic.GetText("Err_NoLvUpItem", new object[0]);
                }
                else if (!flag2)
                {
                    object[] replaceParams = new object[] { playerData.teamLevel, playerData.AvatarLevelLimit };
                    text = LocalizationGeneralLogic.GetText("Err_AvatarLevelLimit", replaceParams);
                }
                GeneralDialogContext dialogContext = new GeneralDialogContext {
                    type  = GeneralDialogContext.ButtonType.SingleButton,
                    title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
                    desc  = text
                };
                Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
            }
        }
Пример #4
0
 public void OnBuyBtnClick()
 {
     if (Singleton <AccountManager> .Instance.manager.IsAccountBind() || Singleton <NetworkManager> .Instance.DispatchSeverData.isReview)
     {
         this.DoBuyHcoin();
     }
     else
     {
         GeneralDialogContext dialogContext = new GeneralDialogContext {
             type                   = GeneralDialogContext.ButtonType.DoubleButton,
             title                  = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
             desc                   = LocalizationGeneralLogic.GetText("Menu_Action_TouristeCharge", new object[0]),
             okBtnText              = LocalizationGeneralLogic.GetText("Menu_Action_DoBindAccount", new object[0]),
             cancelBtnText          = LocalizationGeneralLogic.GetText("Menu_Action_ContinueRecharge", new object[0]),
             notDestroyAfterTouchBG = true,
             buttonCallBack         = delegate(bool confirmed) {
                 if (confirmed)
                 {
                     Singleton <MainUIManager> .Instance.ShowPage(new PlayerProfilePageContext(PlayerProfilePageContext.TabType.AccountTab), UIType.Page);
                 }
                 else
                 {
                     this.DoBuyHcoin();
                 }
             }
         };
         Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
     }
 }
Пример #5
0
        private bool OnPlayerLoginRsp(PlayerLoginRsp rsp)
        {
            if (rsp.get_retcode() == null)
            {
                MonoTestUI sceneCanvas = Singleton <MainUIManager> .Instance.SceneCanvas as MonoTestUI;
                if (sceneCanvas.avatar3dModelContext != null)
                {
                    return(false);
                }
                sceneCanvas.MainCamera.SetActive(true);
                sceneCanvas.MainMenu_SpaceShip.SetActive(true);
                sceneCanvas.avatar3dModelContext = new Avatar3dModelContext(null);
                Singleton <MainUIManager> .Instance.ShowWidget(sceneCanvas.avatar3dModelContext, UIType.Root);

                GameObject            view         = GameObject.Find("MainMenu_SpaceShip");
                GameObject            uiMainCamera = GameObject.Find("MainCamera");
                SpaceShipModelContext widget       = new SpaceShipModelContext(view, uiMainCamera);
                Singleton <MainUIManager> .Instance.ShowWidget(widget, UIType.Any);

                GraphicsSettingData.ApplySettingConfig();
                AudioSettingData.ApplySettingConfig();
                this.TestCode(sceneCanvas);
            }
            else
            {
                GeneralDialogContext dialogContext = new GeneralDialogContext {
                    type  = GeneralDialogContext.ButtonType.SingleButton,
                    title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
                    desc  = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0]),
                    notDestroyAfterTouchBG = true
                };
                Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
            }
            return(false);
        }
Пример #6
0
        private bool OnBuyGoodsRsp(BuyGoodsRsp rsp)
        {
            if (rsp.get_retcode() == null)
            {
                this.SetupView();
                Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(LocalizationGeneralLogic.GetText("Menu_ShopBuyGoodsSuccess", new object[0]), 2f), UIType.Any);

                base.view.transform.Find("ShopTab").gameObject.GetComponent <MonoShopStoreTab>().OnBuyGoodsRsp(rsp);
            }
            else
            {
                GeneralDialogContext dialogContext = new GeneralDialogContext {
                    type  = GeneralDialogContext.ButtonType.SingleButton,
                    title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0])
                };
                dialogContext.desc = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0]);
                if (!string.IsNullOrEmpty(dialogContext.desc))
                {
                    Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
                }
                if ((rsp.get_retcode() == 6) || (rsp.get_retcode() == 7))
                {
                    Singleton <NetworkManager> .Instance.RequestGetShopList();
                }
            }
            return(false);
        }
        public bool OnAvatarReviveRsp(AvatarReviveRsp rsp)
        {
            if (rsp.get_retcode() == null)
            {
                if (rsp.get_revive_timesSpecified())
                {
                    int num = this._levelScoreManager.maxReviveNum - ((int)rsp.get_revive_times());
                    if (this._levelScoreManager.avaiableReviveNum > num)
                    {
                        this._levelScoreManager.avaiableReviveNum = num;
                        this._levelActor.ReviveAvatarByID(this._reviveContext.avatarRuntimeID, this._reviveContext.revivePosition);
                        this.Destroy();
                        Singleton <WwiseAudioManager> .Instance.Post("BGM_PauseMenu_Off", null, null, null);

                        this._reviveContext.OnReviveConfirm();
                    }
                }
            }
            else
            {
                GeneralDialogContext dialogContext = new GeneralDialogContext {
                    type  = GeneralDialogContext.ButtonType.SingleButton,
                    title = LocalizationGeneralLogic.GetText("Menu_Title_ExchangeFail", new object[0]),
                    desc  = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0])
                };
                Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
            }
            return(false);
        }
Пример #8
0
 private bool OnStageEndRsp(StageEndRsp rsp)
 {
     this._stageEndRsp = rsp;
     if (rsp.get_retcode() == null)
     {
         if (this._levelSuccess)
         {
             LevelScoreManager instance = Singleton <LevelScoreManager> .Instance;
             if (rsp.get_stage_idSpecified())
             {
             }
             this._leftPanelAnimationManager.AddAnimation(base.view.transform.Find("Title").GetComponent <MonoAnimationinSequence>(), null);
             this.SetupRewardPanel(this._stageEndRsp);
             this.ShowRewardPanel();
         }
     }
     else
     {
         GeneralDialogContext dialogContext = new GeneralDialogContext {
             type  = GeneralDialogContext.ButtonType.SingleButton,
             title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
             desc  = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0])
         };
         Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
     }
     return(false);
 }
Пример #9
0
        private bool OnGetAcceptFriendInviteRsp(AcceptFriendInviteRsp rsp)
        {
            if (MiscData.Config.BasicConfig.IsInviteFeatureEnable)
            {
                if (Singleton <NetworkManager> .Instance.DispatchSeverData.isReview)
                {
                    return(false);
                }
                if (!Singleton <AccountManager> .Instance.manager.IsAccountBind())
                {
                    return(false);
                }
                if (rsp.get_retcode() == null)
                {
                    Singleton <NetworkManager> .Instance.RequestGetInviteeFriend();

                    Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(LocalizationGeneralLogic.GetText("Menu_InviteInputSuccess", new object[0]), 2f), UIType.Any);
                }
                else
                {
                    GeneralDialogContext dialogContext = new GeneralDialogContext {
                        type  = GeneralDialogContext.ButtonType.SingleButton,
                        title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
                        desc  = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0]),
                        notDestroyAfterTouchBG = true
                    };
                    Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
                }
            }
            return(false);
        }
Пример #10
0
 public void OnOkBtnClick()
 {
     if (this._selectedItem != null)
     {
         if (this._selectedItem.rarity > 3)
         {
             GeneralDialogContext dialogContext = new GeneralDialogContext {
                 type           = GeneralDialogContext.ButtonType.DoubleButton,
                 title          = LocalizationGeneralLogic.GetText("Menu_Tips", new object[0]),
                 desc           = LocalizationGeneralLogic.GetText("Menu_Desc_WillConsume3StarItemHint", new object[0]),
                 buttonCallBack = delegate(bool confirmed) {
                     if (confirmed)
                     {
                         Singleton <NetworkManager> .Instance.RequestFeedStigmataAffix(this.stigmata.uid, this._selectedItem.uid);
                     }
                 }
             };
             Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
         }
         else
         {
             Singleton <NetworkManager> .Instance.RequestFeedStigmataAffix(this.stigmata.uid, this._selectedItem.uid);
         }
     }
 }
Пример #11
0
 public void OnOkBtnClick()
 {
     if (this._resourceList.Count > 0)
     {
         bool flag = false;
         foreach (StorageDataItemBase base2 in this._resourceList)
         {
             if (((base2 is WeaponDataItem) || (base2 is StigmataDataItem)) && (base2.rarity >= 3))
             {
                 flag = true;
                 break;
             }
         }
         if (flag)
         {
             GeneralDialogContext dialogContext = new GeneralDialogContext {
                 type           = GeneralDialogContext.ButtonType.DoubleButton,
                 title          = LocalizationGeneralLogic.GetText("Menu_Tips", new object[0]),
                 desc           = LocalizationGeneralLogic.GetText("Menu_Desc_WillConsume3StarItemHint", new object[0]),
                 buttonCallBack = delegate(bool confirmed) {
                     if (confirmed)
                     {
                         this.DoStartPowerup();
                     }
                 }
             };
             Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
         }
         else
         {
             this.DoStartPowerup();
         }
     }
 }
Пример #12
0
        private bool OnSkillPointExchangeRsp(SkillPointExchangeRsp rsp)
        {
            GeneralDialogContext context;

            base.view.transform.Find("SkillTab").GetComponent <MonoAvatarDetailSkillTab>().SetupSkillPoint();
            if (rsp.get_retcode() == null)
            {
                context = new GeneralDialogContext {
                    type  = GeneralDialogContext.ButtonType.SingleButton,
                    title = LocalizationGeneralLogic.GetText("Menu_Title_ExchangeSucc", new object[0])
                };
                object[] replaceParams = new object[] { rsp.get_hcoin_cost(), rsp.get_skill_point_get() };
                context.desc = LocalizationGeneralLogic.GetText("Menu_Desc_SkillPtExchangeRes", replaceParams);
                Singleton <MainUIManager> .Instance.ShowDialog(context, UIType.Any);
            }
            else if (rsp.get_retcode() == 2)
            {
                context = new GeneralDialogContext {
                    type          = GeneralDialogContext.ButtonType.DoubleButton,
                    title         = LocalizationGeneralLogic.GetText("Menu_GoToRecharge", new object[0]),
                    desc          = LocalizationGeneralLogic.GetText("Menu_GoToRechargeDesc", new object[0]),
                    okBtnText     = LocalizationGeneralLogic.GetText("Menu_GoToRecharge", new object[0]),
                    cancelBtnText = LocalizationGeneralLogic.GetText("Menu_GiveUpRecharge", new object[0])
                };
                if (< > f__am$cache9 == null)
                {
Пример #13
0
        private bool OnGachaRsp(GachaRsp rsp)
        {
            if (rsp.get_retcode() == null)
            {
                this._gachaGotList.Clear();
                this._gachaItemList             = rsp.get_item_list();
                this._dropItemShowDialogManager = new SequenceDialogManager(new Action(this.ShowGachaResultPage));
                this._unLockAvatarDialogManager = new SequenceDialogManager(new Action(this.ClearUnlockAvatarDialogManagerContent));
                foreach (GachaItem item in rsp.get_item_list())
                {
                    StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem((int)item.get_item_id(), (int)item.get_level());

                    if (dummyStorageDataItem != null)
                    {
                        dummyStorageDataItem.number = (int)item.get_num();
                        if (dummyStorageDataItem is AvatarCardDataItem)
                        {
                            if (item.get_split_fragment_numSpecified())
                            {
                                (dummyStorageDataItem as AvatarCardDataItem).SpliteToFragment((int)item.get_split_fragment_num());
                            }
                            else
                            {
                                AvatarCardDataItem        item2         = dummyStorageDataItem as AvatarCardDataItem;
                                AvatarUnlockDialogContext dialogContext = new AvatarUnlockDialogContext(AvatarMetaDataReaderExtend.GetAvatarIDsByKey(item2.ID).avatarID, true);
                                this._unLockAvatarDialogManager.AddDialog(dialogContext);
                            }
                        }
                        this._gachaGotList.Add(dummyStorageDataItem);
                        List <Tuple <StorageDataItemBase, bool> > itemDataList = new List <Tuple <StorageDataItemBase, bool> > {
                            new Tuple <StorageDataItemBase, bool>(dummyStorageDataItem, item.get_is_rare_drop())
                        };
                        if (item.get_gift_item_idSpecified())
                        {
                            StorageDataItemBase base3 = Singleton <StorageModule> .Instance.GetDummyStorageDataItem((int)item.get_gift_item_id(), (int)item.get_gift_level());

                            if (base3 != null)
                            {
                                base3.number = (int)item.get_gift_num();
                                itemDataList.Add(new Tuple <StorageDataItemBase, bool>(base3, false));
                                this._gachaGotList.Add(base3);
                            }
                        }
                        this._dropItemShowDialogManager.AddDialog(new DropNewItemDialogContextV2(itemDataList));
                    }
                }
                this._waitGachaRsp.End();
            }
            else if (rsp.get_retcode() == 3)
            {
                GeneralDialogContext context2 = new GeneralDialogContext {
                    type  = GeneralDialogContext.ButtonType.SingleButton,
                    title = LocalizationGeneralLogic.GetText("Menu_Return_GachaTitcketLack", new object[0]),
                    desc  = LocalizationGeneralLogic.GetText("Menu_Return_GachaTitcketLack", new object[0])
                };
                Singleton <MainUIManager> .Instance.ShowDialog(context2, UIType.Any);
            }
            this.UpdateView();
            return(false);
        }
Пример #14
0
        public void OnOkButtonCallBack()
        {
            if ((this.levelData.LevelType == 1) && (this.levelData.UnlockChanllengeNum > Singleton <LevelModule> .Instance.GetChapterById(this.levelData.ChapterID).GetTotalFinishedChanllengeNum(this.levelData.Diffculty)))
            {
                object[] replaceParams = new object[] { this.levelData.UnlockChanllengeNum };
                Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(LocalizationGeneralLogic.GetText("Menu_ChallengeLackLock", replaceParams), 2f), UIType.Any);
            }
            else if (this.levelData.isDropActivityOpen && (this.levelData.dropActivityEndTime <= TimeUtil.Now))
            {
                GeneralDialogContext dialogContext = new GeneralDialogContext {
                    type           = GeneralDialogContext.ButtonType.DoubleButton,
                    desc           = LocalizationGeneralLogic.GetText("Menu_Desc_LevelDropActivityEndHint", new object[0]),
                    buttonCallBack = delegate(bool confirmed) {
                        if (confirmed)
                        {
                            this.EnterPreparePage();
                        }
                    }
                };
                Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);

                this.SetupView();
            }
            else
            {
                this.EnterPreparePage();
            }
        }
Пример #15
0
        public void OnLogoutBtnClick()
        {
            GeneralDialogContext dialogContext = new GeneralDialogContext {
                type  = GeneralDialogContext.ButtonType.DoubleButton,
                title = LocalizationGeneralLogic.GetText("Menu_Title_Logout", new object[0]),
                desc  = LocalizationGeneralLogic.GetText("Menu_Desc_Logout", new object[0])
            };

            if (< > f__am$cache0 == null)
            {
Пример #16
0
        public void OnManualRefresh()
        {
            if (this._storeDataItem.manualRefreshTimes < this._storeDataItem.maxManualRefreshTimes)
            {
                GeneralDialogContext context;
                string text = LocalizationGeneralLogic.GetText("Menu_Hcoin", new object[0]);
                if (this._storeDataItem.refreshItemID == 0)
                {
                    if (this._storeDataItem.nextRefreshCost > Singleton <PlayerModule> .Instance.playerData.hcoin)
                    {
                        object[] replaceParams = new object[] { text };
                        Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(LocalizationGeneralLogic.GetText("Menu_ShopManualRefreshLackHCoin", replaceParams), 2f), UIType.Any);
                    }
                    else
                    {
                        context = new GeneralDialogContext {
                            type  = GeneralDialogContext.ButtonType.DoubleButton,
                            title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0])
                        };
                        object[] objArray2 = new object[] { this._storeDataItem.nextRefreshCost, text };
                        context.desc           = LocalizationGeneralLogic.GetText("Menu_Desc_RefreshShopHint", objArray2);
                        context.buttonCallBack = new Action <bool>(this.DoRequestToRefresh);
                        Singleton <MainUIManager> .Instance.ShowDialog(context, UIType.Any);
                    }
                }
                else
                {
                    int number = 0;
                    StorageDataItemBase base2 = Singleton <StorageModule> .Instance.TryGetMaterialDataByID(this._storeDataItem.refreshItemID);

                    StorageDataItemBase dummyStorageDataItem = Singleton <StorageModule> .Instance.GetDummyStorageDataItem(this._storeDataItem.refreshItemID, 1);

                    if (base2 != null)
                    {
                        number = base2.number;
                    }
                    if (this._storeDataItem.nextRefreshCost > number)
                    {
                        object[] objArray3 = new object[] { dummyStorageDataItem.GetDisplayTitle() };
                        Singleton <MainUIManager> .Instance.ShowDialog(new GeneralHintDialogContext(LocalizationGeneralLogic.GetText("Menu_ShopManualRefreshLackHCoin", objArray3), 2f), UIType.Any);
                    }
                    else
                    {
                        context = new GeneralDialogContext {
                            type  = GeneralDialogContext.ButtonType.DoubleButton,
                            title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0])
                        };
                        object[] objArray4 = new object[] { this._storeDataItem.nextRefreshCost, dummyStorageDataItem.GetDisplayTitle() };
                        context.desc           = LocalizationGeneralLogic.GetText("Menu_Desc_RefreshShopHint", objArray4);
                        context.buttonCallBack = new Action <bool>(this.DoRequestToRefresh);
                        Singleton <MainUIManager> .Instance.ShowDialog(context, UIType.Any);
                    }
                }
            }
        }
Пример #17
0
        private void CreateSingleButtonTemplate()
        {
            GeneralDialogContext context2 = new GeneralDialogContext {
                type  = GeneralDialogContext.ButtonType.SingleButton,
                title = "TestUI",
                desc  = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0])
            };
            BaseDialogContext dialogContext = context2;

            Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
        }
Пример #18
0
        public void OnDeleteFriendBtnClick()
        {
            GeneralDialogContext dialogContext = new GeneralDialogContext {
                type           = GeneralDialogContext.ButtonType.DoubleButton,
                title          = LocalizationGeneralLogic.GetText("Menu_Action_DeleteFriend", new object[0]),
                desc           = LocalizationGeneralLogic.GetText("Menu_Desc_ConfirmDeleteFriend", new object[0]),
                okBtnText      = LocalizationGeneralLogic.GetText("Menu_Action_Delete", new object[0]),
                buttonCallBack = new Action <bool>(this.DeleteFriendConfirmCallBack)
            };

            Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
        }
Пример #19
0
 public void TryShowErrorDialog()
 {
     if ((this._errorDialogContext == null) || (this._errorDialogContext.view == null))
     {
         GeneralDialogContext context = new GeneralDialogContext {
             type  = GeneralDialogContext.ButtonType.SingleButton,
             title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
             desc  = LocalizationGeneralLogic.GetText("Err_PlayerRepeatLogin", new object[0]),
             notDestroyAfterTouchBG = true,
             hideCloseBtn           = true
         };
         if (< > f__am$cacheC == null)
         {
Пример #20
0
 private void CheckInviteHint()
 {
     if (this.CanShowInviteHintDialog())
     {
         GeneralDialogContext context2 = new GeneralDialogContext {
             type          = GeneralDialogContext.ButtonType.DoubleButton,
             title         = LocalizationGeneralLogic.GetText("Title_InvitationCode_Input", new object[0]),
             desc          = LocalizationGeneralLogic.GetText("Invitation_Tutorial", new object[0]),
             okBtnText     = LocalizationGeneralLogic.GetText("Menu_OK", new object[0]),
             cancelBtnText = LocalizationGeneralLogic.GetText("Menu_Cancel", new object[0])
         };
         if (< > f__am$cacheB == null)
         {
Пример #21
0
 public bool OnAvatarStarUpRsp(AvatarStarUpRsp rsp)
 {
     if (rsp.get_retcode() != null)
     {
         GeneralDialogContext dialogContext = new GeneralDialogContext {
             type  = GeneralDialogContext.ButtonType.SingleButton,
             title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
             desc  = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0])
         };
         Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
     }
     return(false);
 }
Пример #22
0
        private void SetupUseToolConfirmDialog(EndlessToolDataItem toolData)
        {
            object[] replaceParams = new object[] { toolData.GetDisplayTitle() };
            string   text          = LocalizationGeneralLogic.GetText("Menu_Desc_EndlessComfirmUse", replaceParams);

            if (toolData.ShowIcon)
            {
                if (toolData.ApplyToSelf)
                {
                    List <EndlessToolDataItem> appliedToolDataList = Singleton <EndlessModule> .Instance.GetAppliedToolDataList();

                    for (int i = 0; i < appliedToolDataList.Count; i++)
                    {
                        if (appliedToolDataList[i].ID == toolData.ID)
                        {
                            object[] objArray2 = new object[] { toolData.GetDisplayTitle() };
                            text = LocalizationGeneralLogic.GetText("Menu_Desc_EndlessComfirmReuse", objArray2);
                            break;
                        }
                    }
                }
                else if ((toolData.ToolType != 3) && (this._selectPlayer != null))
                {
                    List <EndlessWaitEffectItem> list2 = this._selectPlayer.get_wait_effect_item_list();
                    for (int j = 0; j < list2.Count; j++)
                    {
                        if (list2[j].get_item_id() == toolData.ID)
                        {
                            object[] objArray3 = new object[] { toolData.GetDisplayTitle() };
                            text = LocalizationGeneralLogic.GetText("Menu_Desc_EndlessComfirmReuse", objArray3);
                            break;
                        }
                    }
                }
            }
            if (Singleton <EndlessModule> .Instance.SelfInvisible())
            {
                text = text + Environment.NewLine + LocalizationGeneralLogic.GetText("Menu_Desc_InvisibleItemWillLoseEffectHint", new object[0]);
            }
            GeneralDialogContext dialogContext = new GeneralDialogContext {
                type                   = GeneralDialogContext.ButtonType.DoubleButton,
                title                  = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
                desc                   = text,
                buttonCallBack         = new Action <bool>(this.OnConfirmUseTool),
                notDestroyAfterTouchBG = true,
                destroyCallBack        = new Action(this.ClearSelectPlayer)
            };

            Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
        }
Пример #23
0
 public void AntiCheatQuit(string title, string text)
 {
     try
     {
         GeneralDialogContext dialogContext = new GeneralDialogContext {
             type  = GeneralDialogContext.ButtonType.SingleButton,
             title = LocalizationGeneralLogic.GetText(title, new object[0]),
             desc  = LocalizationGeneralLogic.GetText(text, new object[0]),
             notDestroyAfterTouchBG = true,
             hideCloseBtn           = true
         };
         if (< > f__am$cache5 == null)
         {
             < > f__am$cache5 = ok => Quit();
         }
Пример #24
0
        private bool OnStageEnterTimesRsp(ResetStageEnterTimesRsp rsp)
        {
            GeneralDialogContext context;

            if (rsp.get_retcode() == 2)
            {
                context = new GeneralDialogContext {
                    type          = GeneralDialogContext.ButtonType.DoubleButton,
                    title         = LocalizationGeneralLogic.GetText("Menu_GoToRecharge", new object[0]),
                    desc          = LocalizationGeneralLogic.GetText("Menu_GoToRechargeDesc", new object[0]),
                    okBtnText     = LocalizationGeneralLogic.GetText("Menu_GoToRecharge", new object[0]),
                    cancelBtnText = LocalizationGeneralLogic.GetText("Menu_GiveUpRecharge", new object[0])
                };
                if (< > f__am$cache2 == null)
                {
Пример #25
0
        private void OnFinishLevelUpNowBtnClick()
        {
            GeneralDialogContext dialogContext = new GeneralDialogContext {
                type  = GeneralDialogContext.ButtonType.DoubleButton,
                title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0])
            };

            object[] replaceParams = new object[1];
            TimeSpan span          = (TimeSpan)(this._cabinData.levelUpEndTime - TimeUtil.Now);

            replaceParams[0] = Singleton <IslandModule> .Instance.GetFinishLevelUpNowHcoinCost((int)span.TotalSeconds);

            dialogContext.desc           = LocalizationGeneralLogic.GetText("Menu_Desc_ConfirmToFinishCabinLevelUpNow", replaceParams);
            dialogContext.buttonCallBack = new Action <bool>(this.OnConfirmToFinishLevelUpBtnClick);
            Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
        }
 public bool OnSelectNewStigmataAffixRsp(SelectNewStigmataAffixRsp rsp)
 {
     if (rsp.get_retcode() == null)
     {
         this.OnBGClick();
     }
     else
     {
         GeneralDialogContext dialogContext = new GeneralDialogContext {
             type = GeneralDialogContext.ButtonType.SingleButton,
             title = LocalizationGeneralLogic.GetText("Menu_Title_ExchangeFail", new object[0]),
             desc = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0])
         };
         Singleton<MainUIManager>.Instance.ShowDialog(dialogContext, UIType.Any);
     }
     return false;
 }
Пример #27
0
 public bool OnDispatchIslandVentureRsp(DispatchIslandVentureRsp rsp)
 {
     if (rsp.get_retcode() == null)
     {
         this.BackPage();
     }
     else
     {
         GeneralDialogContext dialogContext = new GeneralDialogContext {
             type  = GeneralDialogContext.ButtonType.SingleButton,
             title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0]),
             desc  = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0])
         };
         Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
     }
     return(false);
 }
Пример #28
0
        private void ShowConfirmSkipDialog()
        {
            GeneralDialogContext dialogContext = new GeneralDialogContext {
                type  = GeneralDialogContext.ButtonType.DoubleButton,
                title = LocalizationGeneralLogic.GetText("Skip_Confirm_Title", new object[0]),
                desc  = LocalizationGeneralLogic.GetText("Skip_Confirm_Content", new object[0]),
                notDestroyAfterTouchBG  = true,
                notDestroyAfterCallback = false,
                buttonCallBack          = delegate(bool confirmed) {
                    if (confirmed)
                    {
                        this.SkipPlot();
                    }
                }
            };

            Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
        }
Пример #29
0
        private bool FriendConditionCheck(int needFriendPoint)
        {
            if (this.IsStorageFull())
            {
                return(false);
            }
            if (Singleton <PlayerModule> .Instance.playerData.friendsPoint < needFriendPoint)
            {
                GeneralDialogContext dialogContext = new GeneralDialogContext {
                    type = GeneralDialogContext.ButtonType.DoubleButton,
                    desc = LocalizationGeneralLogic.GetText("Err_FriendPointShortage", new object[0])
                };
                Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);

                return(false);
            }
            return(true);
        }
Пример #30
0
 public bool OnStageBeginRsp(EndlessStageBeginRsp rsp)
 {
     if (rsp.get_retcode() == null)
     {
         this._stageBeginRsp = rsp;
         this.DoBeginLevel();
     }
     else
     {
         this.ResetWaitPacketData();
         GeneralDialogContext dialogContext = new GeneralDialogContext {
             type  = GeneralDialogContext.ButtonType.SingleButton,
             title = LocalizationGeneralLogic.GetText("Menu_Title_Tips", new object[0])
         };
         dialogContext.desc = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0]);
         Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any);
     }
     return(false);
 }