【宝物详情】界面修改
parent
72c97f8408
commit
fdb71b6cad
|
|
@ -14,22 +14,19 @@ local equipDataList
|
|||
local position
|
||||
local isGongMing = false
|
||||
|
||||
--基础属性
|
||||
local curBasePropertyList={}
|
||||
local nextBasePropertyList={}
|
||||
--精炼属性
|
||||
local curRefinePropertyList={}
|
||||
local nextRefinePropertyList={}
|
||||
--神应属性
|
||||
local curTreePropertyList={}
|
||||
local nextTreePropertyList={}
|
||||
|
||||
|
||||
--初始化组件(用于子类重写)
|
||||
function RoleEquipTreasureChangePopup:InitComponent()
|
||||
equipData = {}
|
||||
this.btnBack= Util.GetGameObject(self.transform, "btnBack")
|
||||
this.GameObject=Util.GetGameObject(self.transform, "GameObject")
|
||||
this.BasePropertyList = {}
|
||||
this.RefinePropertyList = {}
|
||||
this.TreePropertyList = {}
|
||||
for i = 1, 2 do
|
||||
this.BasePropertyList[i] = {}
|
||||
this.RefinePropertyList[i] = {}
|
||||
this.TreePropertyList[i] = {}
|
||||
end
|
||||
this.treasurePanel = {}
|
||||
for i = 1, 2 do
|
||||
if not this.treasurePanel[i] then
|
||||
|
|
@ -187,15 +184,9 @@ function RoleEquipTreasureChangePopup:OnOpen(_openThisPanel,_type,_curHeroData,_
|
|||
equipData[1] = _curEquipData--lv
|
||||
equipData[2] = _nextEquipData--refinelv
|
||||
position = _position--treelv
|
||||
|
||||
LogGreen("equipData[1].upHeroDid:"..tostring(equipData[1]))
|
||||
if equipData[1] and equipData[1] ~= 0 then
|
||||
isGongMing = HarmonyManager.IsInfo(equipData[1].upHeroDid)
|
||||
Util.SetGray(this.treasurePanel[1].EquipBtnStrong, isGongMing)
|
||||
end
|
||||
end
|
||||
function RoleEquipTreasureChangePopup:OnShow()
|
||||
LogRed("type:"..type)
|
||||
LogGreen("ShowType:"..type)
|
||||
--初始化
|
||||
for i = 1, 2 do
|
||||
this.treasurePanel[i].bg:SetActive(false)
|
||||
|
|
@ -234,7 +225,10 @@ function RoleEquipTreasureChangePopup:OnShow()
|
|||
this.treasurePanel[2].EquipBtnRefine:SetActive(type == 3)
|
||||
this.space:SetActive(type == 5)
|
||||
|
||||
|
||||
if equipData[1] and equipData[1] ~= 0 then
|
||||
isGongMing = HarmonyManager.IsInfo(equipData[1].upHeroDid)
|
||||
Util.SetGray(this.treasurePanel[1].EquipBtnStrong, isGongMing)
|
||||
end
|
||||
end
|
||||
|
||||
function this.resetData()
|
||||
|
|
@ -273,8 +267,6 @@ function this.resetData()
|
|||
end
|
||||
|
||||
function this.ShowEquipData(i)
|
||||
LogGreen("equipData[i].id:"..tostring(equipData[i].id))
|
||||
LogGreen("equipData[i].idDyn:"..tostring(equipData[i].idDyn))
|
||||
local equipConfigData = ConfigManager.GetConfigData(ConfigName.JewelConfig, equipData[i].id)
|
||||
local itemConfigData = ConfigManager.GetConfigData(ConfigName.ItemConfig, equipData[i].id)
|
||||
local Power = {}
|
||||
|
|
@ -371,27 +363,31 @@ function this.ShowEquipData(i)
|
|||
--(基础属性)
|
||||
this.treasurePanel[i].bgScroll:GetComponent("RectTransform").sizeDelta = Vector2.New(800,100)
|
||||
local baseInfo = EquipTreasureManager.GetCurLvPropertyValue(1,equipData[i].levelPool,equipData[i].lv)
|
||||
this.treasurePanel[i].BaseAttriNum.text = "[强化等级:"..equipData[i].lv.."/"..equipData[i].maxLv.."]"
|
||||
this.SetPropertyShow1(baseInfo,curBasePropertyList,this.treasurePanel[i].BaseAttriGrid)
|
||||
-- this.treasurePanel[i].BaseAttriNum.text = "[强化等级:"..equipData[i].lv.."/"..equipData[i].maxLv.."]"
|
||||
this.treasurePanel[i].BaseAttriNum.text = string.format("[强化等级:%s/%s]",equipData[i].lv,equipData[i].maxLv)
|
||||
LogYellow("i:"..i)
|
||||
this.SetPropertyShow1(baseInfo,this.BasePropertyList[i],this.treasurePanel[i].BaseAttriGrid)
|
||||
--(精炼属性)
|
||||
local refineInfo = EquipTreasureManager.GetCurLvPropertyValue(2,equipData[i].refinePool,equipData[i].refineLv)
|
||||
this.treasurePanel[i].RefineAttriNum.text = "[精炼等级:"..equipData[i].refineLv.."/"..equipData[i].maxRefineLv.."]"
|
||||
-- this.treasurePanel[i].RefineAttriNum.text = "[精炼等级:"..equipData[i].refineLv.."/"..equipData[i].maxRefineLv.."]"
|
||||
this.treasurePanel[i].RefineAttriNum.text = string.format("[精炼等级:%s/%s]",equipData[i].refineLv,equipData[i].maxRefineLv)
|
||||
if LengthOfTable(refineInfo) == 0 or refineInfo == nil then
|
||||
this.treasurePanel[i].RefineAttri:SetActive(false)
|
||||
else
|
||||
this.treasurePanel[i].RefineAttri:SetActive(true)
|
||||
this.treasurePanel[i].bgScroll:GetComponent("RectTransform").sizeDelta = Vector2.New(800,250)
|
||||
this.SetPropertyShow1(refineInfo,curRefinePropertyList,this.treasurePanel[i].RefineAttriGrid)
|
||||
this.SetPropertyShow1(refineInfo,this.RefinePropertyList[i],this.treasurePanel[i].RefineAttriGrid)
|
||||
end
|
||||
--(神应属性)
|
||||
local treeInfo=EquipTreasureManager.GetCurLvPropertyValue(3,equipData[i].treePool,equipData[i].treeLv)
|
||||
this.treasurePanel[i].TreeAttriNum.text = "[神应等级:"..equipData[i].treeLv.."/"..equipData[i].maxTreeLv.."]"
|
||||
-- this.treasurePanel[i].TreeAttriNum.text = "[神应等级:"..equipData[i].treeLv.."/"..equipData[i].maxTreeLv.."]"
|
||||
this.treasurePanel[i].TreeAttriNum.text = string.format("[神应等级:%s/%s]",equipData[i].treeLv,equipData[i].maxTreeLv)
|
||||
if equipData[i].upHeroDid == "" or equipData[i].upHeroDid == "0" or treeLv == 0 then
|
||||
this.treasurePanel[i].TreeAttri:SetActive(false)
|
||||
else
|
||||
this.treasurePanel[i].TreeAttri:SetActive(true)
|
||||
this.treasurePanel[i].bgScroll:GetComponent("RectTransform").sizeDelta = Vector2.New(800,500)
|
||||
this.SetPropertyShow2(treeInfo,curTreePropertyList,this.treasurePanel[i].TreeAttriGrid)
|
||||
this.SetPropertyShow2(treeInfo,this.TreePropertyList[i],this.treasurePanel[i].TreeAttriGrid)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -424,7 +420,8 @@ function this.SetPropertyShow2(_infos,_preList,_grid)
|
|||
if index <= curTree then
|
||||
string = "<color=#66FF00>"..string.."</color>"
|
||||
else
|
||||
string = "<color=#828282>"..string.."\n".."<size=25>(四灵试炼"..attriConfig[index][2].."层解锁)</size></color>"
|
||||
-- string = "<color=#828282>"..string.."\n".."<size=25>(四灵试炼"..attriConfig[index][2].."层解锁)</size></color>"
|
||||
string = "<color=#828282>"..string.."\n".."<size=25>"..string.format("(四灵试炼%s层解锁)",attriConfig[index][2]).."</size></color>"
|
||||
end
|
||||
obj.transform:GetComponent("Text").text = string
|
||||
obj.gameObject:SetActive(true)
|
||||
|
|
@ -439,6 +436,8 @@ end
|
|||
|
||||
function this.SetPropertyShow1(_infos,_preList,_grid)
|
||||
local dataCount=LengthOfTable(_infos)
|
||||
LogPink("_grid:"..tostring(_grid))
|
||||
LogPink("dataCount:"..dataCount)
|
||||
local preCount=#_preList
|
||||
for i = 1, dataCount-preCount do
|
||||
local go = newObject(this.TextPre)
|
||||
|
|
@ -454,8 +453,10 @@ function this.SetPropertyShow1(_infos,_preList,_grid)
|
|||
local proper=propertyConfig[key]
|
||||
if proper.Style==1 then
|
||||
obj.transform:GetComponent("Text").text = GetLanguageStrById(proper.Info).."+".. value.currValue
|
||||
LogPurple("这里?")
|
||||
else
|
||||
obj.transform:GetComponent("Text").text=GetLanguageStrById(proper.Info).."+"..value.currValue/100 .."%"
|
||||
LogPurple("这里???")
|
||||
end
|
||||
obj.gameObject:SetActive(true)
|
||||
index=index+1
|
||||
|
|
@ -481,13 +482,6 @@ function RoleEquipTreasureChangePopup:OnDestroy()
|
|||
equipIdList=nil
|
||||
equipDataList=nil
|
||||
position=0
|
||||
|
||||
curBasePropertyList={}
|
||||
nextBasePropertyList={}
|
||||
curRefinePropertyList={}
|
||||
nextRefinePropertyList={}
|
||||
curTreePropertyList={}
|
||||
nextTreePropertyList={}
|
||||
end
|
||||
|
||||
return RoleEquipTreasureChangePopup
|
||||
Loading…
Reference in New Issue