Revert "Revert "强化和精炼界面修改""

This reverts commit 4c9871767f.
dev_chengFeng
jiaoyangna 2021-07-28 16:59:00 +08:00
parent 7ac8f03cd3
commit 8c01285354
2 changed files with 22 additions and 6 deletions

View File

@ -42,6 +42,7 @@ function EquipTreasureStrongPopup:InitComponent()
local rootWidth=this.firstScroll.transform.rect.width local rootWidth=this.firstScroll.transform.rect.width
this.firstScrollCycleView = SubUIManager.Open(SubUIConfig.ScrollCycleView,this.firstScroll.transform,this.itemPre,nil, Vector2.New(rootWidth,rootHight), 1, 5, Vector2.New(15,30)) this.firstScrollCycleView = SubUIManager.Open(SubUIConfig.ScrollCycleView,this.firstScroll.transform,this.itemPre,nil, Vector2.New(rootWidth,rootHight), 1, 5, Vector2.New(15,30))
this.gongming = Util.GetGameObject(this.content,"gongming") this.gongming = Util.GetGameObject(this.content,"gongming")
this.gongming.gameObject:SetActive(false)
this.select = Util.GetGameObject(this.content,"select") this.select = Util.GetGameObject(this.content,"select")
end end
@ -62,6 +63,9 @@ function EquipTreasureStrongPopup:BindEvent()
end) end)
--强化按钮 --强化按钮
Util.AddClick(this.btnStrong, function() Util.AddClick(this.btnStrong, function()
if HarmonyManager.IsInfo(curEquipData.upHeroDid) then
return
end
--如果强化界面 强化到最高等级谈提示 精炼界面 就切界面 --如果强化界面 强化到最高等级谈提示 精炼界面 就切界面
if type==1 then if type==1 then
if isMax then if isMax then
@ -260,8 +264,8 @@ function EquipTreasureStrongPopup:SetWindShow(_index)
this.btnRefine:SetActive(false) this.btnRefine:SetActive(false)
this.btnStrong:SetActive(true) this.btnStrong:SetActive(true)
this.SetBtnSelect(this.btn_strongPage) this.SetBtnSelect(this.btn_strongPage)
isMax = curEquipData.lv == curEquipData.maxLv isMax = curEquipData.lv == curEquipData.maxLv
this.properList[0].leftTxt.text = "强化等级" this.properList[0].leftTxt.text = "强化等级"
if isMax then if isMax then
this.properList[0].rightTxt.text = Language[11062] this.properList[0].rightTxt.text = Language[11062]
this.btnStrong.gameObject:SetActive(false) this.btnStrong.gameObject:SetActive(false)
@ -291,7 +295,13 @@ function EquipTreasureStrongPopup:SetWindShow(_index)
items = this:GetCostItems(curEquipData.refineConfig) items = this:GetCostItems(curEquipData.refineConfig)
this.hintTxt.text=Language[11782] this.hintTxt.text=Language[11782]
end end
this.hintTxt.gameObject:SetActive(isMax)
if HarmonyManager.IsInfo(curEquipData.upHeroDid) and _index == 1 then
this.hintTxt.text = "共鸣中的宝物无法强化"
this.hintTxt.gameObject:SetActive(true)
else
this.hintTxt.gameObject:SetActive(isMax)
end
this:SetPropertyShow(propertyShow) this:SetPropertyShow(propertyShow)
this:CostShow(items) this:CostShow(items)
end end
@ -424,14 +434,20 @@ end
--设置属性的显示 --设置属性的显示
function EquipTreasureStrongPopup:SetPropertyShow(_infos) function EquipTreasureStrongPopup:SetPropertyShow(_infos)
if this.hintTxt.gameObject.activeInHierarchy then
this.properList[0].go.gameObject:SetActive(false)
this.propertyGrid.gameObject:SetActive(false)
return
end
this.propertyGrid.gameObject:SetActive(true)
if type == 1 and HarmonyManager.IsInfo(curEquipData.upHeroDid) then if type == 1 and HarmonyManager.IsInfo(curEquipData.upHeroDid) then
for i = 0, #this.properList do for i = 0, #this.properList do
this.properList[i].go.gameObject:SetActive(false) this.properList[i].go.gameObject:SetActive(false)
end end
this.gongming.gameObject:SetActive(true) --this.gongming.gameObject:SetActive(true)
return return
end end
this.gongming.gameObject:SetActive(false) --this.gongming.gameObject:SetActive(false)
this.properList[0].go.gameObject:SetActive(true) this.properList[0].go.gameObject:SetActive(true)
for i = 1, #this.properList do for i = 1, #this.properList do
this.properList[i].go.gameObject:SetActive(false) this.properList[i].go.gameObject:SetActive(false)

View File

@ -359,7 +359,7 @@ end
function this.SetPropertyShow(_infos,_preList,_grid) function this.SetPropertyShow(_infos,_preList,_grid)
local dataCount=LengthOfTable(_infos) local dataCount=LengthOfTable(_infos)
local preCount=#_preList local preCount = #_preList
for i = 1, dataCount-preCount do for i = 1, dataCount-preCount do
local go = newObject(this.propertyPre) local go = newObject(this.propertyPre)
go.transform:SetParent(_grid.transform) go.transform:SetParent(_grid.transform)