Example #1
0
        public void OnClanDismissBtnClick()
        {
            if ((EMClanState)LogicDataCenter.clanDataManager.ClanBaseData.nState == EMClanState.emClanState_Dismissing)
            {
                // 取消解散联盟
                ViewEventHelper.Instance.SendCommand(GameLogicDef.GVIEWCMD_CLAN_CANCEL_DISMISS);
            }
            else
            {
                string dismissContent = ULocalizationService.Instance.Get("UIView", "ClanDetail", "DissmissContent_1");
                if (LogicDataCenter.clanDataManager.ClanBaseData.nKinCount > 1)
                {
                    int    dismissingLife = ASpeedGame.Data.ClanConfig.ClanConfig.Instance.tClanConfig.nDismissingLife;
                    string tips           = ObtainDismissTimeTip(dismissingLife);
                    dismissContent += String.Format(ULocalizationService.Instance.Get("UIView", "ClanDetail", "DissmissContent_2"), tips);
                }

                UBB.toHtml(ref dismissContent);
                TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "ClanDetail", "DissmissTitle"),
                    message: dismissContent,
                    buttons: new UIWidgets.DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "ClanDetail", "Confirm"), ClanDissmiss }, { ULocalizationService.Instance.Get("UIView", "ClanDetail", "Cancel"), null }
                }
                    );
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
            }
        }
Example #2
0
        public void OnGuideMachineBtnClick()
        {
            if (LogicDataCenter.pkDataManager.BIsPK)
            {
                TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "PK", "StopMessage"),
                    message: ULocalizationService.Instance.Get("UIView", "PK", "SurrenderMessage"),
                    buttons: new DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), CancelPK },
                    { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), null }
                }
                    );

                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
                return;
            }

            if (LogicDataCenter.viewPersonStateDataManager.bDelayJoinMatchRoom)
            {
                UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_PLAYER_CANT_DO_THIS_OPRATION);
                return;
            }

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_WAR_MAIN_OPEN, null);

            // 发送到逻辑层 引导相关记录
            cmd_guide_info dataInfo = new cmd_guide_info();

            dataInfo.nGuideID = (int)EMMatchGuideStep.GuideStep_RadomMachine_StartWar;

            ViewEventHelper.Instance.SendCommand <cmd_guide_info>(GameLogicDef.GVIEWCMD_MATCH_GUIDE_INFO, ref dataInfo);
        }
Example #3
0
        public void OnGenicImageClick(int index)
        {
            int nHeroID = arrayCollectGenic[index].nHeroID;

            if (nHeroID <= 0)
            {
                return;
            }

            SSchemePersonModelData heroData = new SSchemePersonModelData();

            if (PersonModelConfig.Instance.GetData_Out(nHeroID, out heroData) == false)
            {
                return;
            }

            string content = string.Format("是否进化为{0}英雄,进化后无法逆转", heroData.szHeroName);

            UBB.toHtml(ref content);
            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: "进化",
                message: content,
                buttons: new UIWidgets.DialogActions()
            {
                { "进化", () => OnEnvolveHero(index) }, { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), null }
            },
                modal: true,
                mutex: true
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #4
0
        public void OnClickAddCupListBtn()
        {
            if (LogicDataCenter.kinDataManager.KinBaseData.dwShaikhID != nSelfPDBID)
            {
                UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_LEGENDCUP_NOT_SHAIKH_CANT_REQUEST);
                return;
            }

            cmd_legendcup_recv_cuplist_node cupBaseData = LogicDataCenter.legendCupDataManager.GetSingleLegendCupNode(nLegendCupID);

            if (cupBaseData.nLegendCupID == 0)
            {
                return;
            }

            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "AddCupTitle"),
                message: String.Format(ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "AddCupContent"), cupBaseData.nRegistGold),
                buttons: new UIWidgets.DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "ConfirmBtn"), OnConfirmAddCup },
                { ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "CancelBtn"), null }
            }
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #5
0
        public void OnSurviveVSModeBtnClick()
        {
            //UIMsgCmdData cmdData = new UIMsgCmdData((int)WndMsgID.WND_MSG_RANK_INVITE_SHOW, (int)EMMatchType.MatchType_MultiCampMatch, "", IntPtr.Zero, 0);
            //UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_RANK_INVITE_SHOW, cmdData);

            //if (LogicDataCenter.viewPersonStateDataManager.bIsMatching == true)
            //{
            //    UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_MATCH_PLEASE_QUIT_MATCH);
            //    return;
            //}

            //if (LogicDataCenter.viewPersonStateDataManager.bDelayJoinMatchRoom)
            //{
            //    UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_PLAYER_CANT_DO_THIS_OPRATION);
            //    return;
            //}

            //LogicDataCenter.matchDataManager.OnSurviveVSModeBtnClick();

            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: "生存模式",
                message: "生存模式正在开发中....",
                buttons: new UIWidgets.DialogActions()
            {
                { "确认", null }
            }
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #6
0
        public void OnSaveBtnClick()
        {
            if (bSaveWndOpen)
            {
                return;
            }

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_SYSTEMSETTING_SAVE, null);
            //保存游戏设置更改的数据
            //xmlNode.SaveGameSettingsDirty();
            //SetVisible(false);

            // 确定按钮点击
            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: "系统设置",
                message: "保存成功",
                closeButtonAction: () => { CloseSaveWnd(); },
                buttons: new UIWidgets.DialogActions()
            {
                { "确认", CloseSaveWnd }
            }
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
            bSaveWndOpen = true;
        }
Example #7
0
        public void OnRestoreBtnClick()
        {
            if (bRestWndOpen)
            {
                return;
            }

            //重置游戏设置数据
            //xmlNode.AllRestoreDefaultGameSettings();
            GameSettingConfig.Instance.RestGameSetting();
            SlotKeyCodeConfig.Instance.RestSlotData();
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_SYSTEMSETTING_RESTORE, null);

            // 恢复默认按钮点击
            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: "系统设置",
                message: "已恢复系统默认设置",
                closeButtonAction: () => { CloseRestWnd(); },
                buttons: new UIWidgets.DialogActions()
            {
                { "确认", CloseRestWnd }
            }
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
            bRestWndOpen = true;
        }
Example #8
0
        public void onWarHillPressDwon()
        {
            if (LogicDataCenter.pkDataManager.BIsPK)
            {
                TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "PK", "StopMessage"),
                    message: ULocalizationService.Instance.Get("UIView", "PK", "SurrenderMessage"),
                    buttons: new DialogActions()
                {
                    { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), CancelPK },
                    { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), null }
                }
                    );

                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
                return;
            }

            if (LogicDataCenter.viewPersonStateDataManager.bDelayJoinMatchRoom)
            {
                UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_PLAYER_CANT_DO_THIS_OPRATION);
                return;
            }

            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_WAR_MAIN_OPEN, null);
        }
Example #9
0
        public void OnClickConfirmBtn()
        {
            // 未选择裁决结果
            if (NodeResult.SelectedIndex < 0)
            {
                UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_LEGENDCUP_NOT_SELECT_CANT_JUDGE_WAR);
                return;
            }

            EJudgeNodeWar byJudgeFlag = EJudgeNodeWar.JUDGE_NONE;
            int           nWinID      = 0;
            string        strResult   = null;

            switch (NodeResult.SelectedIndex)
            {
            case 0:
            {
                byJudgeFlag = EJudgeNodeWar.JUDGE_SelectWinner;
                nWinID      = m_judegeData.nKin1ID;
                strResult   = m_judegeData.szKin1Name + ULocalizationService.Instance.Get("UIView", "LegendCupWarRecord", "Win");
            }
            break;

            case 1:
            {
                byJudgeFlag = EJudgeNodeWar.JUDGE_SelectWinner;
                nWinID      = m_judegeData.nKin2ID;
                strResult   = m_judegeData.szKin2Name + ULocalizationService.Instance.Get("UIView", "LegendCupWarRecord", "Win");
            }
            break;

            case 2:
            {
                byJudgeFlag = EJudgeNodeWar.JUDGE_AllKnockOut;
                nWinID      = 0;
                strResult   = ULocalizationService.Instance.Get("UIView", "LegendCupWarRecord", "Abstain");
            }
            break;

            default:
                break;
            }

            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: ULocalizationService.Instance.Get("UIView", "LegendCupWarRecord", "ConfirmTitle"),
                message: string.Format(ULocalizationService.Instance.Get("UIView", "LegendCupWarRecord", "ConfirmContent"), m_judegeData.szKin1Name, m_judegeData.szKin2Name, strResult),
                buttons: new UIWidgets.DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "LegendCupWarRecord", "Confirm"), () => { DoJudgeCup(byJudgeFlag, nWinID); return(true); } }, { ULocalizationService.Instance.Get("UIView", "LegendCupWarRecord", "Cancel"), null }
            }
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #10
0
 private void ShowDialog(string title, string content, DialogActions buttons)
 {
     UBB.toHtml(ref content);
     TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
         title: title,
         message: content,
         modal: false,
         hideByModalClick: false,
         modalColor: Color.clear,
         buttons: buttons,
         mutex: true,
         eDialogType: EDialogType.LifeHeroCulture
         );
     UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
 }
Example #11
0
        /// <summary>
        /// 战场内退出游戏
        /// </summary>
        private void warQuitGame()
        {
            EMHallRoomType eRoomType = (EMHallRoomType)GameLogicAPI.getCurRoomType();

            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                modal: true,
                title: ULocalizationService.Instance.Get("UIView", "SystemSettingView", "QuitWarAsk"),
                message: getWarExitDes(eRoomType),
                buttons: new UIWidgets.DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), ConfirmWarQuit },
                { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), CancelWarQuit }
            });
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #12
0
        public void RequestJoinTeamConfirm(int idActor, string strActorName)
        {
            // 是自己
            if (EntityFactory.MainHeroView.Property.GetNumProp(ENTITY_PROPERTY.PROPERTY_ID) == idActor)
            {
                return;
            }
            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: ULocalizationService.Instance.Get("UIView", "TeamMate", "RequestJoinTitle"),
                message: String.Format(ULocalizationService.Instance.Get("UIView", "TeamMate", "RequestJoinDes"), strActorName),
                buttons: new UIWidgets.DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "TeamMate", "RequestJoinConfirm"), () => { ConfirmBtnClick(idActor); return(true); } },
                { ULocalizationService.Instance.Get("UIView", "TeamMate", "RequestJoinCancel"), null }
            }

                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #13
0
        public void OnClickDeleteCupListBtn()
        {
            if (LogicDataCenter.kinDataManager.KinBaseData.dwShaikhID != nSelfPDBID)
            {
                UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_LEGENDCUP_NOT_SHAIKH_CANT_REQUEST);
                return;
            }

            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "QuitCupTitle"),
                message: ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "QuitCupContent"),
                buttons: new UIWidgets.DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "ConfirmBtn"), OnConfirmQuitCup },
                { ULocalizationService.Instance.Get("UIView", "LegendCupRegist", "CancelBtn"), null }
            }
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #14
0
        public void OnClickConfirmBtn()
        {
            DateTime newDateTime;

            if (CheckInputTime(out newDateTime) == false)
            {
                return;
            }

            // todo 可以选择时间 和 得分
            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: ULocalizationService.Instance.Get("UIView", "LegendCupOnlineReset", "OnlineResetTitle"),
                message: ULocalizationService.Instance.Get("UIView", "LegendCupOnlineReset", "OnlineResetContent"),
                buttons: new UIWidgets.DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "LegendCupWarRecord", "Confirm"), DoOnlienResetCup }, { ULocalizationService.Instance.Get("UIView", "LegendCupWarRecord", "Cancel"), null }
            }
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #15
0
        public void OnKindomWarBtnClick(bool bActive)
        {
            if (!bActive)
            {
                return;
            }

            socialWnd.SwitchWndPage(SocialFrameButtonType.BTN_KINGDOMWAR);

            // 确定按钮点击
            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: "王城战系统",
                message: "王城战系统正在开发中....",
                buttons: new UIWidgets.DialogActions()
            {
                { "确认", null }
            },
                modal: true
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #16
0
        private void QuitApplication()
        {
            if (bOpenQuitDialog)
            {
                return;
            }

            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                modal: true,
                title: ULocalizationService.Instance.Get("UIView", "SystemSettingView", "QuitConfirm"),
                message: ULocalizationService.Instance.Get("UIView", "SystemSettingView", "QuitGameAsk"),
                closeButtonAction: () => { CancelQuit(); },
                modalClickAction: () => { CancelQuit(); },
                buttons: new UIWidgets.DialogActions()
            {
                { ULocalizationService.Instance.Get("UIView", "Common", "ConfirmBtn"), ConfirmQuit },
                { ULocalizationService.Instance.Get("UIView", "Common", "CancelBtn"), CancelQuit }
            });
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
            bOpenQuitDialog = true;
        }
Example #17
0
        public void OnVersionInfoMsgBtnClick(bool bActive)
        {
            if (!bActive)
            {
                return;
            }

            mailBoxWnd.SwitchWndPage(MailBoxFrameButtonType.BTN_VERSIONINFO);

            // 确定按钮点击
            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: "版本信息系统",
                message: "版本信息系统正在开发中....",
                buttons: new UIWidgets.DialogActions()
            {
                { "确认", null }
            },
                modal: true
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #18
0
        public void OnRecreationModeBtnClick()
        {
            if (LogicDataCenter.viewPersonStateDataManager.bIsMatching == true)
            {
                UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_MATCH_PLEASE_QUIT_MATCH);
                return;
            }

            if (LogicDataCenter.viewPersonStateDataManager.bDelayJoinMatchRoom)
            {
                UIUtil.ShowSystemMessage(EMChatTipID.CHAT_TIP_PLAYER_CANT_DO_THIS_OPRATION);
                return;
            }

            TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                title: "娱乐模式",
                message: "娱乐模式娱乐模式正在开发中",
                buttons: new UIWidgets.DialogActions()
            {
                { "确认", null }
            }
                );
            UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
        }
Example #19
0
        /* 在刚进入主城时判断是否需要本命弹窗
         * 本命弹窗逻辑:
         * 1、从战场结算界面返回主城
         * 2、还没有收集完本命英雄
         * 3、本命记录里没有该英雄
         * 4、比赛必须满员
         * 5、比赛类型必须满足配置要求的比赛类型(lifehero.csv)
         */
        private void OpenLifeHeroDialog()
        {
            if (!LogicDataCenter.lifeHeroDataManager.IsFromWarExit)
            {
                return;
            }

            LogicDataCenter.lifeHeroDataManager.IsFromWarExit = false;
            if (StageManager.Instance.getCurrentState() != EStage_State.ESS_GAME && StageManager.Instance.getCurrentState() != EStage_State.ESS_LOADSCENE)
            {
                Debug.Log("recv all lifehero at gamestate=" + StageManager.Instance.getCurrentState() + ", so dont show dialog.");
                return;
            }

            if (!LogicDataCenter.lifeHeroDataManager.HasCollectedAllLifeHero() &&
                (GuideManager.Instance.IsCurrentGuideGreaterEqual(ENNOVICEGUIDE_TYPE.ENNOVICEGUIDE_TYPE_GUIDE_LIFEHEROCULTURE) ||
                 (LogicDataCenter.playerSystemDataManager.GetActorPlayerInfo().playerInfo.nLv > 3)))
            {
                List <cmd_warstatistic_history_record> recordList = LogicDataCenter.lifeHeroDataManager.HistoryRecord;
                if (recordList == null || recordList.Count < 1)
                {
                    Debug.LogWarning("lifehero entance: history record is empty.");
                    return;
                }

                cmd_warstatistic_history_record record = recordList[0];
                if (!record.bIsFull)
                {
                    return;
                }

                Dictionary <int, cmd_entity_lifehero_info> ownedLifeHero = LogicDataCenter.lifeHeroDataManager.AllLifeHero;
                if (ownedLifeHero.ContainsKey(record.nHeroID))
                {
                    return;
                }

                if (!LifeHeroConfig.Instance.IsMeetWarType(ownedLifeHero.Count, record.wWarType))
                {
                    return;
                }

                string        content;
                DialogActions buttons;
                if (LifeHeroRules.IsMeetRule(LogicDataCenter.lifeHeroDataManager.AllLifeHero.Count, record))
                {
                    content = ULocalizationService.Instance.Get("UIView", "LifeHeroSelect", "TravelContent_Good");
                    buttons = new UIWidgets.DialogActions()
                    {
                        { ULocalizationService.Instance.Get("UIView", "LifeHeroSelect", "Confirm"), () => { UISystem.Instance.ShowWnd(WndID.WND_ID_LIFE_HERO_CULTURE, true); return(true); } }, { ULocalizationService.Instance.Get("UIView", "LifeHeroSelect", "Cancel"), null }
                    };
                }
                else
                {
                    SSchemeLifeHero config;
                    int             key = LogicDataCenter.lifeHeroDataManager.AllLifeHero.Count;
                    if (LifeHeroConfig.Instance.LifeHeroConfigDic.TryGetValue(key, out config))
                    {
                        content = string.Format(ULocalizationService.Instance.Get("UIView", "LifeHeroSelect", "TravelContent_NontDiscourage"), config.rule);
                        buttons = new UIWidgets.DialogActions()
                        {
                            { ULocalizationService.Instance.Get("UIView", "LifeHeroSelect", "Confirm"), () => { UISystem.Instance.ShowWnd(WndID.WND_ID_WAR_MAIN_FRAME, true);; return(true); } }, { ULocalizationService.Instance.Get("UIView", "LifeHeroSelect", "Cancel"), null }
                        };
                    }
                    else
                    {
                        Debug.LogError("获取本命配置失败.key = " + key);
                        return;
                    }
                }

                UBB.toHtml(ref content);
                TooltipAndDialog.UIDialogData data = new TooltipAndDialog.UIDialogData(
                    title: ULocalizationService.Instance.Get("UIView", "LifeHeroSelect", "TravelTitle"),
                    message: content,
                    buttons: buttons,
                    modal: false,
                    hideByModalClick: false,
                    modalColor: Color.clear,
                    mutex: true,
                    eDialogType: EDialogType.LifeHeroEntrance
                    );
                UISystem.Instance.SendWndMessage(WndMsgID.WND_MSG_COMMON_DIALOG, data);
            }
        }