多语言lua脚本修改
parent
5d607967da
commit
0df0725829
|
@ -1564,7 +1564,7 @@ MonoBehaviour:
|
|||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u786E \u5B9A"
|
||||
m_Text: "\u786E\u5B9A"
|
||||
LanguageIndex: 0
|
||||
--- !u!1 &3149411855646198429
|
||||
GameObject:
|
||||
|
|
|
@ -232,7 +232,7 @@ function this.PageTabAdapter(tab, index, status)
|
|||
end
|
||||
if not sprite then
|
||||
sprite = (status == "select" and tabs[index].Icon[2] or tabs[index].Icon[1])
|
||||
nameText.text = tabs[index].Sesc
|
||||
nameText.text = GetLanguageStrById(tabs[index].Sesc)
|
||||
end
|
||||
img.sprite = this.spLoader:LoadSprite(sprite)
|
||||
img:SetNativeSize()
|
||||
|
|
|
@ -1077,7 +1077,7 @@ function this.CreatActivity()
|
|||
end
|
||||
if tempConfig then
|
||||
activityTabs[k].img.sprite = this.spLoader:LoadSprite(tempConfig.Icon[1])
|
||||
activityTabs[k].nameText.text = tempConfig.Sesc
|
||||
activityTabs[k].nameText.text =GetLanguageStrById(tempConfig.Sesc)
|
||||
else
|
||||
activityTabs[k].img.sprite = this.spLoader:LoadSprite(v.Icon[1])
|
||||
end
|
||||
|
|
|
@ -503,8 +503,8 @@ function RewardItemSingleShowPopup:OnShow()
|
|||
this.armorDesc.gameObject:SetActive(true)
|
||||
--this.armorTitle.text = string.format("<size=45><color=#FBCC99>%s</color></size>",itemConfigData.Name)
|
||||
--this.armorDesc.text = string.format("<size=37><color=#FFCC00>%s</color></size>",heroConfig.HeroLocationDesc1)
|
||||
this.armorTitle.text = itemConfigData.Name
|
||||
this.armorDesc.text = heroConfig.HeroLocationDesc1
|
||||
this.armorTitle.text = GetLanguageStrById(itemConfigData.Name)
|
||||
this.armorDesc.text = GetLanguageStrById(heroConfig.HeroLocationDesc1)
|
||||
|
||||
this.armorType.gameObject:SetActive(false)
|
||||
this.armorLanTuNum.gameObject:SetActive(false)
|
||||
|
@ -568,8 +568,8 @@ function RewardItemSingleShowPopup:OnShow()
|
|||
else
|
||||
this.btnClose:SetActive(false)
|
||||
this.equipQuaText.gameObject:SetActive(true)
|
||||
this.equipQuaText.text = GetStringByEquipQua(itemConfigData.Quantity,
|
||||
GetQuaStringByEquipQua(itemConfigData.Quantity))
|
||||
this.equipQuaText.text = GetLanguageStrById(GetStringByEquipQua(itemConfigData.Quantity,
|
||||
GetQuaStringByEquipQua(itemConfigData.Quantity)))
|
||||
this.pos.gameObject:SetActive(false)
|
||||
this.armorInfo.gameObject:SetActive(true)
|
||||
this.armorTitle.gameObject:SetActive(false)
|
||||
|
|
|
@ -109,7 +109,7 @@ end
|
|||
function this.TabAdapter(tab, index, status)
|
||||
local tabLab = Util.GetGameObject(tab, "Text")
|
||||
Util.GetGameObject(tab, "Image"):GetComponent("Image").sprite = this.spLoader:LoadSprite(_TabData[index][status])
|
||||
tabLab:GetComponent("Text").text = _TabData[index].name
|
||||
tabLab:GetComponent("Text").text = GetLanguageStrById(_TabData[index].name)
|
||||
tabLab:GetComponent("Text").color = _TabFontColor[status]
|
||||
end
|
||||
|
||||
|
@ -202,10 +202,10 @@ function this:OnShow(_parent, _args)
|
|||
if newHeroId ~= 0 then
|
||||
this.newObj:SetActive(true)
|
||||
local newHeroConfig = heroConfig[newHeroId]
|
||||
this.des1.text = newHeroConfig.HeroLocation
|
||||
this.des2.text = newHeroConfig.HeroLocationDesc1
|
||||
this.des1.text = GetLanguageStrById(newHeroConfig.HeroLocation)
|
||||
this.des2.text = GetLanguageStrById(newHeroConfig.HeroLocationDesc1)
|
||||
this.newPro.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(newHeroConfig.PropertyName))
|
||||
this.newName.text = newHeroConfig.ReadingName
|
||||
this.newName.text = GetLanguageStrById(newHeroConfig.ReadingName)
|
||||
this.newIcon.sprite = this.spLoader:LoadSprite(artResourcesConfig[newHeroConfig.Icon].Name)
|
||||
this.hint.text = Language[12274]
|
||||
Util.AddOnceClick(this.newIcon.gameObject, function()
|
||||
|
@ -239,16 +239,16 @@ function this.SingleHeroDataShow(go, _heroData, _index)
|
|||
local rank = Util.GetGameObject(_go.transform, "rank"):GetComponent("Text")
|
||||
local proIcon = Util.GetGameObject(_go.transform, "pro"):GetComponent("Image")
|
||||
local desc = Util.GetGameObject(_go.transform, "Desc"):GetComponent("Text")
|
||||
desc.text = config.HeroLocation
|
||||
desc.text = GetLanguageStrById(config.HeroLocation)
|
||||
local desc2 = Util.GetGameObject(_go.transform, "Desc2"):GetComponent("Text")
|
||||
local hot = Util.GetGameObject(_go.transform, "hot")
|
||||
hot:SetActive(false)
|
||||
local btn_zan = Util.GetGameObject(_go.transform, "btn_zan")
|
||||
local numTxt = Util.GetGameObject(_go.transform, "numTxt"):GetComponent("Text")
|
||||
numTxt.text = PrintWanNum(heroData.power)
|
||||
desc2.text = config.HeroLocationDesc1
|
||||
desc2.text = GetLanguageStrById(config.HeroLocationDesc1)
|
||||
proIcon.sprite = this.spLoader:LoadSprite(GetProStrImageByProNum(config.PropertyName))
|
||||
name.text = config.ReadingName
|
||||
name.text = GetLanguageStrById(config.ReadingName)
|
||||
icon.sprite = this.spLoader:LoadSprite(artResourcesConfig[config.Icon].Name)
|
||||
if _index < 4 then
|
||||
rankImg.sprite = this.spLoader:LoadSprite("r_Dungeon_00" .. _index)
|
||||
|
|
|
@ -410,7 +410,7 @@ function this:RefreshTabData()
|
|||
this.itemList[i].tipObj:SetActive(false)
|
||||
this.itemList[i].img.sprite = this.spLoader:LoadSprite(self.dicData[i].Icon[1])
|
||||
LogError("self.dicData[i].Sesc===========================" .. self.dicData[i].Sesc)
|
||||
this.itemList[i].nameTxt.text = self.dicData[i].Sesc
|
||||
this.itemList[i].nameTxt.text = GetLanguageStrById(self.dicData[i].Sesc)
|
||||
local isOpen = true
|
||||
local tip = ""
|
||||
if self.dicData[i].ActId == 2 then
|
||||
|
|
|
@ -413,8 +413,9 @@ function this:RefreshBase()
|
|||
|
||||
-- 商店标题
|
||||
if self.ShopConfig.Name and self.ShopConfig.Name ~= "" then
|
||||
self.titleImg:GetComponent("Text").text = self.ShopConfig.Name ..
|
||||
Language[10074] --self.spLoader:LoadSprite(self.ShopConfig.Title)
|
||||
self.titleImg:GetComponent("Text").text = GetLanguageStrById(self.ShopConfig.Name) ..
|
||||
Language
|
||||
[10074] --self.spLoader:LoadSprite(self.ShopConfig.Title)
|
||||
end
|
||||
|
||||
-- 对话显示
|
||||
|
@ -526,16 +527,17 @@ function this:ShopItemAdapter(shopItem, itemData)
|
|||
if con.ItemType == ItemType.LingShouChip then
|
||||
local haveCount = BagManager.GetTotalItemNum(con.Id)
|
||||
itemName.text = itemName.text ..
|
||||
"\n" ..
|
||||
string.format("<color=%s><size=%s>%s(%s/%s)</size></color>", UIColorStr.BLACK, "25", Language[11974], haveCount,
|
||||
con.UsePerCount)
|
||||
"\n" ..
|
||||
string.format("<color=%s><size=%s>%s(%s/%s)</size></color>", UIColorStr.BLACK, "25", Language[11974],
|
||||
haveCount,
|
||||
con.UsePerCount)
|
||||
end
|
||||
if con.ItemType == ItemType.Talisman then
|
||||
itemDes.gameObject:SetActive(true)
|
||||
if con.ItemDescribe then
|
||||
local str = string.split(con.ItemDescribe, ',')
|
||||
if str[1] then
|
||||
itemDes.text = str[1]
|
||||
itemDes.text = GetLanguageStrById(str[1])
|
||||
end
|
||||
else
|
||||
itemDes.gameObject:SetActive(false)
|
||||
|
@ -553,7 +555,7 @@ function this:ShopItemAdapter(shopItem, itemData)
|
|||
discountbg:SetActive(isDiscount)
|
||||
if isDiscount then
|
||||
discountbg:GetComponent("Image").sprite = self.spLoader:LoadSprite("s_shop_zhekou_0" ..
|
||||
itemInfo.DiscountDegree .. "_zh")
|
||||
itemInfo.DiscountDegree .. "_zh")
|
||||
end
|
||||
end
|
||||
-- 消耗物品的信息
|
||||
|
@ -693,16 +695,16 @@ function this:RechargeShopItemAdapter(shopItem, itemData)
|
|||
firstImg.sprite = self.spLoader:LoadSprite("s_shangcheng_shouchong_zh")
|
||||
end
|
||||
icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemInfo.Resources))
|
||||
num.text = itemInfo.BaseReward[1][2]
|
||||
num.text = GetLanguageStrById(itemInfo.BaseReward[1][2])
|
||||
price.text = MoneyUtil.GetMoneyUnitNameWithMoney(itemInfo.Price) --.. MoneyUtil.GetMoney(itemInfo.Price)
|
||||
|
||||
-- 判断首充赠送
|
||||
local curBuyCount = itemData.buyTimes
|
||||
first:SetActive(curBuyCount < 1)
|
||||
firstNum.text = itemInfo.FirstMultiple[1][2]
|
||||
firstNum.text = GetLanguageStrById(itemInfo.FirstMultiple[1][2])
|
||||
if itemInfo.ContinuedMultiple and tonumber(itemInfo.ContinuedMultiple[1]) ~= nil then
|
||||
xuChong:SetActive(curBuyCount >= 1)
|
||||
xuNum.text = itemInfo.ContinuedMultiple[2]
|
||||
xuNum.text = GetLanguageStrById(itemInfo.ContinuedMultiple[2])
|
||||
else
|
||||
xuChong:SetActive(false)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue