英雄列表阵容显示修改
parent
220e56f8c7
commit
793daedcb4
|
@ -125,6 +125,7 @@ function this:InitComponent()
|
|||
--筛选按钮
|
||||
for i = 0, 5 do
|
||||
tabs[i] = Util.GetGameObject(this.gameObject, "Grid/Tabs/Btn" .. i)
|
||||
Util.GetGameObject(tabs[i], "Text"):GetComponent("Text"):GetComponent("Text").text=PropertyType[i]
|
||||
tabs[i]:SetActive(true)
|
||||
-- if tabsImg[i + 1] then
|
||||
-- tabs[i]:GetComponent("Image").sprite = this.spLoader:LoadSprite(tabsImg[i + 1])
|
||||
|
|
|
@ -135,6 +135,7 @@ function HandBookHeroAndEquipListPanel:InitComponent()
|
|||
Util.GetGameObject(self.transform, "Tabs/grid/box/Btn" .. 0):SetActive(false)
|
||||
for i = 1, 6 do
|
||||
tabs[i] = Util.GetGameObject(self.transform, "Tabs/grid/box/Btn" .. i)
|
||||
Util.GetGameObject(tabs[i], "Text"):GetComponent("Text").text=PropertyType[i]
|
||||
end
|
||||
for i = 1, 5 do
|
||||
tabs[i]:SetActive(true)
|
||||
|
|
|
@ -133,12 +133,13 @@ function this.Show()
|
|||
end
|
||||
local proName=proList[i]:GetComponent("Text")
|
||||
local proImage=Util.GetGameObject(proList[i],"Image"):GetComponent("Image")
|
||||
|
||||
proImage.gameObject:SetActive(false)
|
||||
local skillId=curTalismanConFig.Property[i][1]
|
||||
local curValue=curTalismanConFig.Property[i][2]
|
||||
--LogError("skillid===================="..skillId)
|
||||
proName.text= " <size=40>"..GetLanguageStrById(propertyConfig[skillId].Info).."+"..curValue.."</size>"
|
||||
proImage.sprite=this.spLoader:LoadSprite(artResourcesConfig[propertyConfig[skillId].PropertyIcon].Name)
|
||||
Util.GetGameObject(proImage.gameObject,"Image"):GetComponent("Image"):SetNativeSize()
|
||||
--proImage.sprite=this.spLoader:LoadSprite(artResourcesConfig[propertyConfig[skillId].PropertyIcon].Name)
|
||||
--Util.GetGameObject(proImage.gameObject,"Image"):GetComponent("Image"):SetNativeSize()
|
||||
end
|
||||
|
||||
--显示法宝天赋
|
||||
|
@ -146,6 +147,7 @@ function this.Show()
|
|||
local dowerAllData={}--当前法宝全部天赋数据(天赋可能为空)
|
||||
dowerAllData= ConfigManager.GetAllConfigsDataByKey(ConfigName.EquipTalismana,"TalismanaId",data[2])
|
||||
local dowerData={}--当前法宝全部技能数据(天赋不为空)
|
||||
--LogError("#dowerAllData==================================="..#dowerAllData)
|
||||
for i=1,#dowerAllData do
|
||||
if dowerAllData[i].OpenSkillRules then
|
||||
table.insert( dowerData, dowerAllData[i])
|
||||
|
@ -154,21 +156,30 @@ function this.Show()
|
|||
table.sort(dowerData, function(a,b) return a.Level<b.Level end)
|
||||
--赋值到表现
|
||||
local strTable={}
|
||||
local str=""
|
||||
for n=1,#dowerData do
|
||||
if dowerData[n].Level<=50 then
|
||||
--LogError("dowerData[n].OpenSkillRules[1]======"..dowerData[n].OpenSkillRules[1])
|
||||
if curLv>=dowerData[n].Level then
|
||||
strTable[n]= string.format( Language[11534], dowerData[n].Level,GetLanguageStrById(passiveSkillConfig[dowerData[n].OpenSkillRules[1]].Desc),"\n")
|
||||
--LogError("dowerData[n].OpenSkillRules[1]]=="..dowerData[n].OpenSkillRules[1])
|
||||
if passiveSkillConfig[dowerData[n].OpenSkillRules[1]] then
|
||||
strTable[n]= string.format( Language[11534], dowerData[n].Level,GetLanguageStrById(passiveSkillConfig[dowerData[n].OpenSkillRules[1]].Desc),"\n")
|
||||
end
|
||||
|
||||
else
|
||||
strTable[n]=string.format( Language[11535],dowerData[n].Level,GetLanguageStrById(passiveSkillConfig[dowerData[n].OpenSkillRules[1]].Desc),"\n")
|
||||
if passiveSkillConfig[dowerData[n].OpenSkillRules[1]] then
|
||||
strTable[n]=string.format( Language[11535],dowerData[n].Level,GetLanguageStrById(passiveSkillConfig[dowerData[n].OpenSkillRules[1]].Desc),"\n")
|
||||
end
|
||||
end
|
||||
|
||||
if dowerData[n].Level==30 or dowerData[n].Level==50 then
|
||||
|
||||
strTable[n]=string.gsub(strTable[n],"·","")
|
||||
strTable[n]=Language[11536]..strTable[n]
|
||||
str=str..strTable[n]
|
||||
end
|
||||
end
|
||||
end
|
||||
local str=table.concat(strTable)--将表里字符串拼接
|
||||
--str=table.concat(strTable)--将表里字符串拼接
|
||||
--看这下面 是全角空格哦~
|
||||
this.dowerText.text=string.sub(string.gsub(str," "," "),1,-2)--去除最后\n
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue