属性显示错误修改
parent
1b11728534
commit
ff71fb378e
|
@ -19,6 +19,7 @@ function TailsmanSoulMainPanel:InitComponent()
|
|||
self.upLvBtn = Util.GetGameObject(self.transform, "proMainLayout/upLvBtn")
|
||||
self.upLvBtnText = Util.GetGameObject(self.upLvBtn, "Text"):GetComponent("Text")
|
||||
self.upLvBtnRed = Util.GetGameObject(self.upLvBtn, "red")
|
||||
self.costLayout = Util.GetGameObject(self.transform, "proMainLayout/layout")
|
||||
self.costIconParent = Util.GetGameObject(self.transform, "proMainLayout/layout/iconDi")
|
||||
self.costIcon = Util.GetGameObject(self.costIconParent, "icon"):GetComponent("Image")
|
||||
self.costNum = Util.GetGameObject(self.transform, "proMainLayout/layout/num"):GetComponent("Text")
|
||||
|
@ -176,9 +177,9 @@ function TailsmanSoulMainPanel:GetProData()
|
|||
end
|
||||
local str = ""
|
||||
for i = 1,#curData do
|
||||
str = string.format("<color=#ecdfc8>%s:%s</color>",propertyConfig[curData[i][1]].Info,curData[i][2])
|
||||
str = string.format("<color=#ecdfc8>%s:%s</color>",propertyConfig[curData[i][1]].Info,GetEquipPropertyFormatStr(curData[i][2],propertyConfig[curData[i][1]].Style) )
|
||||
if nextProData[curData[i][1]] then
|
||||
str = str..string.format("<color=#00FF00>(+%s)</color>",nextProData[curData[i][1]])
|
||||
str = str..string.format("<color=#00FF00>(+%s)</color>",GetEquipPropertyFormatStr(nextProData[curData[i][1]] - curData[i][2],propertyConfig[nextProData[i][1]].Style))
|
||||
end
|
||||
table.insert(proData,str)
|
||||
end
|
||||
|
@ -217,9 +218,10 @@ function TailsmanSoulMainPanel:SetCostItem()
|
|||
local costId,num = TailsManSoulManager.GetTailsmanCost(self.data.id,self.data.lv)
|
||||
local curNum = BagManager.GetItemCountById(costId)
|
||||
local colo = curNum >= num and "#FF0000" or "#Ffeac6"
|
||||
local ismax = false
|
||||
if num and num > 0 then
|
||||
self.costLayout.gameObject:SetActive(true)
|
||||
self.costIcon.sprite = self.spLoader:LoadSprite(GetSpriteNameByItemId(costId))
|
||||
self.costIconParent.gameObject:SetActive(true)
|
||||
self.costNum.text = string.format("<color=#%s>%s/%s</color>",colo,curNum,num)
|
||||
if curNum > num then
|
||||
self.upLvBtnRed.gameObject:SetActive(true)
|
||||
|
@ -227,14 +229,16 @@ function TailsmanSoulMainPanel:SetCostItem()
|
|||
self.upLvBtnRed.gameObject:SetActive(false)
|
||||
end
|
||||
Util.SetGray(self.upLvBtn,false)
|
||||
ismax = false
|
||||
else
|
||||
self.upLvBtnRed.gameObject:SetActive(false)
|
||||
self.costIconParent.gameObject:SetActive(false)
|
||||
self.costNum.text = "已达上限"
|
||||
self.costLayout.gameObject:SetActive(false)
|
||||
Util.SetGray(self.upLvBtn,true)
|
||||
ismax = true
|
||||
end
|
||||
if self.data.lv < 1 then
|
||||
self.upLvBtnText.text = "激活"
|
||||
elseif ismax then
|
||||
self.upLvBtnText.text = "已达上限"
|
||||
else
|
||||
self.upLvBtnText.text = "强化"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue