Exemple #1
0
        public string getWarExitDes(EMHallRoomType eRoomType)
        {
            string sDes = "";

            switch (eRoomType)
            {
            case EMHallRoomType.HallRoomType_LegendCup:
            {
                sDes = ULocalizationService.Instance.Get("UIView", "SystemSettingView", "WarLegendCupQuit");
            }
            break;

            case EMHallRoomType.HallRoomType_MacthMachine:
            case EMHallRoomType.HallRoomType_Macth:
            {
                sDes = ULocalizationService.Instance.Get("UIView", "SystemSettingView", "WarMatchQuit");
            }
            break;

            case EMHallRoomType.HallRoomType_Custom:
            {
                sDes = ULocalizationService.Instance.Get("UIView", "SystemSettingView", "WarCustomerQuit");
            }
            break;

            default:
            {
                sDes = ULocalizationService.Instance.Get("UIView", "SystemSettingView", "WarCustomerQuit");
            }
            break;
            }

            return(sDes);
        }
Exemple #2
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);
        }