void ShowTips(SuitOPType type, string suitName) { LocalTextType key = LocalTextType.LocalText_None; if (type == SuitOPType.SuitOPType_Equip) { key = LocalTextType.Local_TXT_Wear; } else if (type == SuitOPType.SuitOPType_Renew) { key = LocalTextType.Local_TXT_Renew; } else if (type == SuitOPType.SuitOPType_Unequip) { key = LocalTextType.Local_TXT_Unload; } else if (type == SuitOPType.SuitOPType_Buy) { key = LocalTextType.Local_TXT_Buy; } if (key != LocalTextType.LocalText_None) { string op = DataManager.Manager <TextManager>().GetLocalText(key); TipsManager.Instance.ShowTips(op + suitName); } }
/// <summary> /// 获取宝石类型名称 /// </summary> /// <param name="gType"></param> /// <returns></returns> public string GetGemNameByType(GameCmd.GemType gType) { LocalTextType key = LocalTextType.LocalText_None; switch (gType) { case GameCmd.GemType.GemType_MagicAttact: key = LocalTextType.Local_TXT_Mattack; break; case GameCmd.GemType.GemType_MagicDefent: key = LocalTextType.Local_TXT_Mdefend; break; case GameCmd.GemType.GemType_PhysicalAttact: key = LocalTextType.Local_TXT_Pattack; break; case GameCmd.GemType.GemType_PhysicalDefent: key = LocalTextType.Local_TXT_Pdefend; break; case GameCmd.GemType.GemType_UpgradeLife: key = LocalTextType.Local_TXT_HpPromote; break; case GameCmd.GemType.GemType_Exp: key = LocalTextType.Local_TXT_ExpAdd; break; } return(GetLocalText(key)); }
/// <summary> /// 设置格子按钮功能 /// </summary> private void SetGridFuc() { LocalTextType key = LocalTextType.LocalText_None; switch (m_em_f) { case FashionGridFunction.Wear: key = LocalTextType.Local_TXT_Wear; break; case FashionGridFunction.Discard: key = LocalTextType.Local_TXT_Discard; break; case FashionGridFunction.Unload: key = LocalTextType.Local_TXT_Unload; break; case FashionGridFunction.Buy: key = LocalTextType.Local_TXT_Buy; break; default: break; } }
/// <summary> /// 根据任务类型获取任务标题 /// </summary> /// <param name="tasType"></param> /// <returns></returns> public string GetTaskTitleByType(GameCmd.TaskType tasType) { LocalTextType key = LocalTextType.LocalText_None; switch (tasType) { case GameCmd.TaskType.TaskType_Normal: key = LocalTextType.Local_TXT_TaskTitle_Main; break; case GameCmd.TaskType.TaskType_Sub: key = LocalTextType.Local_TXT_TaskTitle_Sub; break; case GameCmd.TaskType.TaskType_Loop: key = LocalTextType.Local_TXT_TaskTitle_Daily; break; case GameCmd.TaskType.TaskType_Clan: key = LocalTextType.Local_TXT_Clan; break; case GameCmd.TaskType.TaskType_Achieve: break; } return(GetLocalText(key)); }
void InitRidePreViewUI() { if (!m_bInitViewGrid) { InitViewGrid(); m_bInitViewGrid = true; m_sortDicTabs.Add(0, 1); nameList.Add("全部"); List <table.RideDataBase> ridedatas = GameTableManager.Instance.GetTableList <table.RideDataBase>(); for (int i = 0, imax = ridedatas.Count; i < imax; i++) { if (!m_sortDicTabs.ContainsKey(ridedatas[i].quality)) { m_sortDicTabs.Add(ridedatas[i].quality, m_sortDicTabs.Count + 1); string strTabName = ""; LocalTextType tType = (LocalTextType)Enum.Parse(typeof(LocalTextType), "Ride_Illustrated_" + ridedatas[i].quality.ToString()); strTabName = DataManager.Manager <TextManager>().GetLocalText(tType); nameList.Add(strTabName); } } if (m_ctor_rideQRoot != null) { m_ctor_rideQRoot.RefreshCheck(); m_ctor_rideQRoot.Initialize <UITabGrid>((uint)GridID.Uitabgrid, UIManager.OnObjsCreate, UIManager.OnObjsRelease, OnRideViewGridDataUpdate, OnRideViewGridUIEvent); } } int createCount = (null != nameList) ? nameList.Count : 0; m_ctor_rideQRoot.CreateGrids(createCount); }
public static string GetEquipTypeName(GameCmd.EquipType equipType) { LocalTextType key = LocalTextType.LocalText_None; if (equipTypeNameDic.TryGetValue(equipType, out key)) { return(DataManager.Manager <TextManager>().GetLocalText(key)); } return("Unknow"); }
private void SetToggleContentLabel(uint nid, int nIndex) { m_nIndex = nIndex + 1; LocalTextType textType = (LocalTextType)System.Enum.Parse(typeof(LocalTextType), string.Format("Local_TXT_Welfare7Day_{0}", nid)); BtnType btnType = (BtnType)System.Enum.Parse(typeof(BtnType), string.Format("Content_{0}", m_nIndex)); if (m_dicLable.ContainsKey(btnType) && m_dicLable[btnType] != null) { m_dicLable[btnType].text = DataManager.Manager <TextManager>().GetLocalText(textType); } }
void SetSuoDingText(LocalTextType type) { Transform labelTrans = m_label_jinengsuoding_number.transform.Find("Label"); if (labelTrans != null) { UILabel label = labelTrans.GetComponent <UILabel>(); if (label != null) { label.text = DataManager.Manager <TextManager>().GetLocalText(type); } } }
/// <summary> /// 获取货币名称 /// </summary> /// <param name="mType"></param> /// <returns></returns> public string GetCurrencyNameByType(GameCmd.MoneyType mType) { LocalTextType key = LocalTextType.LocalText_None; switch (mType) { case GameCmd.MoneyType.MoneyType_Coin: key = LocalTextType.Local_TXT_YuanBao; break; case GameCmd.MoneyType.MoneyType_MoneyTicket: key = LocalTextType.Local_TXT_Penney; break; case GameCmd.MoneyType.MoneyType_Gold: key = LocalTextType.Local_TXT_Gold; break; case GameCmd.MoneyType.MoneyType_Reputation: key = LocalTextType.Local_TXT_Rep; break; case GameCmd.MoneyType.MoneyType_Score: key = LocalTextType.Local_TXT_JiFen; break; case GameCmd.MoneyType.MoneyType_AchievePoint: key = LocalTextType.Local_TXT_ChengJiuDian; break; case GameCmd.MoneyType.MoneyType_CampCoin: key = LocalTextType.Local_TXT_ZhanXun; break; case GameCmd.MoneyType.MoneyType_HuntingCoin: key = LocalTextType.Local_TXT_LieHun; break; case GameCmd.MoneyType.MoneyType_FishingMoney: key = LocalTextType.Local_TXT_YuBi; break; case GameCmd.MoneyType.MoneyType_TradeGold: key = LocalTextType.Local_TXT_YinLiang; break; } return(GetLocalText(key)); }
/// <summary> /// 获取装备部位分类的名称 /// </summary> /// <param name="mode"></param> /// <returns></returns> private string GetEquipPartModeName(EquipPartMode mode) { LocalTextType key = LocalTextType.LocalText_None; switch (mode) { case EquipPartMode.AttackPart: key = LocalTextType.Local_TXT_Attack; break; case EquipPartMode.DefendPart: key = LocalTextType.Local_TXT_Defend; break; } return(DataManager.Manager <TextManager>().GetLocalText(key)); }
private LocalTextType GetEquipGridIndexTextType(EquipManager.EquipGridIndexType index) { LocalTextType tt = LocalTextType.LocalText_None; switch (index) { case EquipManager.EquipGridIndexType.First: tt = LocalTextType.Local_Txt_Set_1; break; case EquipManager.EquipGridIndexType.Second: tt = LocalTextType.Local_Txt_Set_2; break; case EquipManager.EquipGridIndexType.Third: tt = LocalTextType.Local_Txt_Set_3; break; } return(tt); }
/// <summary> /// 获取时装名称 /// </summary> /// <param name="type"></param> /// <returns></returns> public static string GetSuitPosName(GameCmd.EquipSuitType type) { LocalTextType key = LocalTextType.LocalText_None; switch (type) { case GameCmd.EquipSuitType.Back_Type: key = LocalTextType.Local_TXT_BackShow; break; case GameCmd.EquipSuitType.Clothes_Type: key = LocalTextType.Local_TXT_Clothes; break; case GameCmd.EquipSuitType.Face_Type: key = LocalTextType.Local_TXT_FaceShow; break; case GameCmd.EquipSuitType.Magic_Pet_Type: key = LocalTextType.Local_TXT_SweetPet; break; case GameCmd.EquipSuitType.Qibing_Type: key = LocalTextType.Local_TXT_Jones; break; case GameCmd.EquipSuitType.Unknow_Type: break; default: break; } if (key == LocalTextType.LocalText_None) { return("Unknow"); } return(DataManager.Manager <TextManager>().GetLocalText(key)); }
string GetName(ActivityType t) { LocalTextType type = LocalTextType.LocalText_None; switch (t) { case ActivityType.GrowthFund: type = LocalTextType.Local_TXT_GrowthFund; break; case ActivityType.SingleRechargeSingleDay: type = LocalTextType.Local_TXT_SingleRechargeSingleDay; break; case ActivityType.AllRechargeSingleDay: type = LocalTextType.Local_TXT_AllRechargeSingleDay; break; case ActivityType.AllCostSingleDay: type = LocalTextType.Local_TXT_AllCostSingleDay; break; case ActivityType.AllRecharge: type = LocalTextType.Local_TXT_AllRecharge; break; case ActivityType.AllCost: type = LocalTextType.Local_TXT_AllCost; break; case ActivityType.DailyGift: type = LocalTextType.Local_TXT_DailyGift; break; } return(DataManager.Manager <TextManager>().GetLocalText(type)); }
/// <summary> /// 获取职业名称 /// </summary> /// <param name="pf"></param> /// <returns></returns> public string GetProfessionName(GameCmd.enumProfession pf) { LocalTextType key = LocalTextType.LocalText_None; switch (pf) { case GameCmd.enumProfession.Profession_Soldier: key = LocalTextType.Local_TXT_Profession_Soldier; break; case GameCmd.enumProfession.Profession_Spy: key = LocalTextType.Local_TXT_Profession_Spy; break; case GameCmd.enumProfession.Profession_Freeman: key = LocalTextType.Local_TXT_Profession_Freeman; break; case GameCmd.enumProfession.Profession_Doctor: key = LocalTextType.Local_TXT_Profession_Doctor; break; case GameCmd.enumProfession.Profession_Gunman: key = LocalTextType.Local_TXT_Profession_Gunman; break; case GameCmd.enumProfession.Profession_Blast: key = LocalTextType.Local_TXT_Profession_Blast; break; } if (key == LocalTextType.LocalText_None) { return("通用"); } return(GetLocalText(key)); }
void ShowTipsEnum(LocalTextType error, params object[] args) { TipsManager.Instance.ShowLocalFormatTips(error, args); }
/// <summary> /// 根据本地语言获取格式化tips /// </summary> /// <param name="localtype"></param> /// <param name="param"></param> public void ShowLocalFormatTips(LocalTextType localtype, params object[] param) { string txt = DataManager.Manager <TextManager>().GetLocalFormatText(localtype, param); ShowTips(txt); }
/// <summary> /// 根据本地语言的宏来显示tips /// </summary> /// <param name="localtype"></param> public void ShowTips(LocalTextType localtype) { string txt = DataManager.Manager <TextManager>().GetLocalText(localtype); ShowTips(txt); }
static public string GetLocalString(LocalTextType type) { return(DataManager.Manager <TextManager>().GetLocalText(type)); }
string GetLocalText(LocalTextType type) { string str = DataManager.Manager <TextManager>().GetLocalText(type); return(str); }
string GetTitle() { LocalTextType type = LocalTextType.LocalText_None; switch (m_welfareType) { case WelfareType.None: break; case WelfareType.Month: type = LocalTextType.Local_TXT_WelfareMonth; break; case WelfareType.OnLine: type = LocalTextType.Local_TXT_WelfareOnline; break; case WelfareType.SevenDay: type = LocalTextType.Local_TXT_Welfare7Day; break; case WelfareType.RoleLevel: type = LocalTextType.Local_TXT_WelfareLeve; break; case WelfareType.OpenSever: type = LocalTextType.Local_TXT_WelfareSever; break; case WelfareType.BindGift: type = LocalTextType.Local_TXT_BindGift; break; case WelfareType.RewardFind: type = LocalTextType.Local_TXT_RewardFind; break; case WelfareType.FriendInvite: type = LocalTextType.Local_TXT_FriendInvite; break; case WelfareType.RushLevel: type = LocalTextType.Local_TXT_RushLevel; break; case WelfareType.CDKey: type = LocalTextType.Local_TXT_CDKey; break; case WelfareType.CollectWord: type = LocalTextType.Local_TXT_CollectWord; break; case WelfareType.End: break; default: break; } return(DataManager.Manager <TextManager>().GetLocalText(type)); }
string GetLocalText(LocalTextType type) { return(DataManager.Manager <TextManager>().GetLocalText(type)); }
/// <summary> /// 获取文本枚举类型获取format text /// </summary> /// <param name="type"></param> /// <param name="param"></param> /// <returns></returns> public string GetLocalFormatText(LocalTextType type, params object[] param) { return(GetLocalFormatText((int)type, param)); }
//1-新手 2-普通 //3-稀少 4-罕见 //5-珍异 6-绝世 public string GetRideQualityStr(uint quality) { LocalTextType tType = (LocalTextType)Enum.Parse(typeof(LocalTextType), "Ride_Illustrated_" + quality.ToString()); return(DataManager.Manager <TextManager>().GetLocalText(tType)); }
/// <summary> /// 根据文本枚举获取本地文本 /// </summary> /// <param name="type"></param> /// <returns></returns> public string GetLocalText(LocalTextType type) { int id = (int)type; return(GetLocalText(id)); }