属性界面修改提交i
parent
04ff9d99e4
commit
0d073eb323
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e5376e1b18fb5f641ad48187404c2708
|
||||
guid: c5af600d75c170d4082c222c2c5e3d29
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
|
|
@ -2285,6 +2285,7 @@ GENERAL_POPUP_TYPE={
|
|||
|
||||
ShenHunShuXing = 54,
|
||||
LingMaiRecord = 55,--灵脉秘境纪录
|
||||
IncarnationDes = 56,
|
||||
}
|
||||
|
||||
--通用信息弹窗类型
|
||||
|
|
|
@ -37,6 +37,7 @@ local contentScripts = {
|
|||
[GENERAL_POPUP_TYPE.ShenHunShuXing] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_ShenhunDes"), panelName = "GeneralBigPopup_ShenhunDes"},
|
||||
--灵脉秘境纪录
|
||||
[GENERAL_POPUP_TYPE.LingMaiRecord] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_LingMaiRecord"), panelName = "GeneralBigPopup_LingMaiRecord"},
|
||||
[GENERAL_POPUP_TYPE.IncarnationDes] = {view = require("Modules/GeneralPanel/View/GeneralBigPopup_IncarnationDes"), panelName = "GeneralBigPopup_IncarnationDes"},
|
||||
}
|
||||
--子模块预设
|
||||
local contentPrefabs={}
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
----- 神应属性弹窗 -----
|
||||
local this = {}
|
||||
local PropertyConfig = ConfigManager.GetConfig(ConfigName.PropertyConfig)
|
||||
--传入父脚本模块
|
||||
local parent
|
||||
local sortingOrder=0
|
||||
local attriList = {}
|
||||
|
||||
function this:InitComponent(gameObject)
|
||||
self.bg =Util.GetGameObject(gameObject, "bg")
|
||||
self.proGroup =Util.GetGameObject(gameObject, "proGroup")
|
||||
self.proTitle =Util.GetGameObject(gameObject, "title")
|
||||
self.proTip =Util.GetGameObject(gameObject, "tip")
|
||||
self.proValue =Util.GetGameObject(gameObject, "pro")
|
||||
self.proNum =Util.GetGameObject(self.proValue, "name")
|
||||
self.close =Util.GetGameObject(gameObject, "close")
|
||||
end
|
||||
|
||||
function this:BindEvent()
|
||||
Util.AddClick(self.close,function()
|
||||
parent:ClosePanel()
|
||||
end)
|
||||
end
|
||||
|
||||
function this:AddListener()
|
||||
end
|
||||
|
||||
function this:RemoveListener()
|
||||
end
|
||||
|
||||
function this:OnShow(_parent,_Data)
|
||||
parent=_parent
|
||||
sortingOrder = _parent.sortingOrder
|
||||
parent.BG:SetActive(false)
|
||||
local args = _Data
|
||||
local data = args[1]
|
||||
for i = 1, #data do
|
||||
if not attriList[i] then
|
||||
attriList[i] = {}
|
||||
attriList[i].proGroup = newObjToParent(self.proGroup,self.bg)
|
||||
end
|
||||
attriList[i].proGroup.gameObject:SetActive(false)
|
||||
if not attriList[i].title then
|
||||
attriList[i].title = newObjToParent(self.proTitle,attriList[i].proGroup)
|
||||
attriList[i].titleCom = Util.GetGameObject(attriList[i].title,"name/text"):GetComponent("Text")
|
||||
end
|
||||
attriList[i].title.gameObject:SetActive(false)
|
||||
for j = 1, #data[i].pro do
|
||||
if not attriList[i].pro then
|
||||
attriList[i].pro = {}
|
||||
end
|
||||
if not attriList[i].TextCom then
|
||||
attriList[i].TextCom = {}
|
||||
end
|
||||
if not attriList[i].proParent then
|
||||
attriList[i].proParent = newObjToParent(self.proValue,attriList[i].proGroup)
|
||||
end
|
||||
if not attriList[i].pro[j] then
|
||||
attriList[i].pro[j] = newObjToParent(self.proNum,attriList[i].proParent)
|
||||
attriList[i].TextCom[j] = attriList[i].pro[j]:GetComponent("Text")
|
||||
end
|
||||
attriList[i].pro[j].gameObject:SetActive(false)
|
||||
end
|
||||
if not attriList[i].tip then
|
||||
attriList[i].tip = newObjToParent(self.proTip,attriList[i].proGroup)
|
||||
attriList[i].tipComp = Util.GetGameObject(attriList[i].tip,"name"):GetComponent("Text")
|
||||
end
|
||||
attriList[i].proGroup.gameObject:SetActive(false)
|
||||
end
|
||||
|
||||
for i = 1, #data do
|
||||
attriList[i].proGroup.gameObject:SetActive(true)
|
||||
if data[i].title and data[i].title ~= "" then
|
||||
attriList[i].title.gameObject:SetActive(true)
|
||||
attriList[i].titleCom.text = data[i].title
|
||||
else
|
||||
attriList[i].title.gameObject:SetActive(false)
|
||||
end
|
||||
for j = 1, #data[i].pro do
|
||||
attriList[i].pro[j].gameObject:SetActive(true)
|
||||
attriList[i].TextCom[j].text = data[i].pro[j]
|
||||
end
|
||||
if data[i].tip and data[i].tip ~= "" then
|
||||
attriList[i].tip.gameObject:SetActive(true)
|
||||
attriList[i].tipComp.text = data[i].tip
|
||||
else
|
||||
attriList[i].tip.gameObject:SetActive(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function this:OnClose()
|
||||
Util.ClearChild(self.bg.transform)
|
||||
attriList = {}
|
||||
end
|
||||
|
||||
function this:OnDestroy()
|
||||
Util.ClearChild(self.bg.transform)
|
||||
attriList = {}
|
||||
end
|
||||
|
||||
return this
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1100773d0ff494742a31abf18f633d7b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -50,16 +50,38 @@ function TailsManSouPanel:BindEvent()
|
|||
self:ClosePanel()
|
||||
end)
|
||||
Util.AddClick(self.addBtn, function()
|
||||
local li = TailsManSoulManager.GetTailsmanTotalPro()
|
||||
local li2 = {}
|
||||
for k,v in pairs(li) do
|
||||
if propertyConfig[k].Style == 1 then
|
||||
li2[k] = v
|
||||
elseif propertyConfig[k].Style == 2 then
|
||||
li2[k] = v/100
|
||||
local s = function(data)
|
||||
local lis1 = {}
|
||||
for k,v in pairs(data) do
|
||||
table.insert(lis1,string.format("<color=#00FF00>%s:+%s</color>",propertyConfig[k].Info,GetPropertyFormatStr(propertyConfig[k].Style,v)))
|
||||
end
|
||||
return lis1
|
||||
end
|
||||
UIManager.OpenPanel(UIName.RoleProInfoPopup,li2,nil,false,nil)
|
||||
local data = {}
|
||||
local singData = {}
|
||||
singData.title = "加成属性"
|
||||
local li = TailsManSoulManager.GetTailsmanTotalPro()
|
||||
singData.pro = s(li)
|
||||
singData.tip = ""
|
||||
table.insert(data,singData)
|
||||
-- for i = 1 ,#data do
|
||||
-- LogGreen("data[i]:"..data[i].title.." #pro:"..#data[i].pro)
|
||||
-- for k,v in ipairs(data[i].pro) do
|
||||
-- LogGreen("data[i]:"..v)
|
||||
-- end
|
||||
-- end
|
||||
UIManager.OpenPanel(UIName.GeneralBigPopup,GENERAL_POPUP_TYPE.IncarnationDes,data)
|
||||
|
||||
-- local li = TailsManSoulManager.GetTailsmanTotalPro()
|
||||
-- local li2 = {}
|
||||
-- for k,v in pairs(li) do
|
||||
-- if propertyConfig[k].Style == 1 then
|
||||
-- li2[k] = v
|
||||
-- elseif propertyConfig[k].Style == 2 then
|
||||
-- li2[k] = v/100
|
||||
-- end
|
||||
-- end
|
||||
-- UIManager.OpenPanel(UIName.RoleProInfoPopup,li2,nil,false,nil)
|
||||
end)
|
||||
self.tabBox = TabBox.New()
|
||||
self.tabBox:SetTabAdapter(self.SetTabAdapter)
|
||||
|
|
Loading…
Reference in New Issue