diff --git a/Assets/ManagedResources/Prefabs/UI/RoleInfo/EquipTreasureStrongPopup.prefab b/Assets/ManagedResources/Prefabs/UI/RoleInfo/EquipTreasureStrongPopup.prefab index c5493b186d..fc76e6498f 100644 --- a/Assets/ManagedResources/Prefabs/UI/RoleInfo/EquipTreasureStrongPopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RoleInfo/EquipTreasureStrongPopup.prefab @@ -725,6 +725,50 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!1 &622393962982824584 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 5759551155482145231} + - component: {fileID: 2415667602025158208} + m_Layer: 5 + m_Name: costItemPre + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &5759551155482145231 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 622393962982824584} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 8601325964190918751} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: -7590.3, y: -314.07507} + m_SizeDelta: {x: 150, y: 150} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2415667602025158208 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 622393962982824584} + m_CullTransparentMesh: 0 --- !u!1 &904155751624298721 GameObject: m_ObjectHideFlags: 0 @@ -753,7 +797,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 8601325964190918751} - m_RootOrder: 4 + m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -791,7 +835,7 @@ RectTransform: - {fileID: 5304136016580012509} - {fileID: 7987669967423616727} m_Father: {fileID: 8601325964190918751} - m_RootOrder: 9 + m_RootOrder: 10 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -1777,7 +1821,7 @@ RectTransform: - {fileID: 1499697434375710272} - {fileID: 6677696287487751865} m_Father: {fileID: 8601325964190918751} - m_RootOrder: 10 + m_RootOrder: 11 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} @@ -1822,7 +1866,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 8601325964190918751} - m_RootOrder: 8 + m_RootOrder: 9 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -1898,6 +1942,7 @@ RectTransform: - {fileID: 2083538556740796198} - {fileID: 7708970020296267502} - {fileID: 1637966701065397349} + - {fileID: 5759551155482145231} - {fileID: 3353385484946297119} - {fileID: 185713926109366426} - {fileID: 2877954084376210547} @@ -2104,7 +2149,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 8601325964190918751} - m_RootOrder: 6 + m_RootOrder: 7 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -2185,7 +2230,7 @@ RectTransform: - {fileID: 8131619857262012692} - {fileID: 5076362339141073474} m_Father: {fileID: 8601325964190918751} - m_RootOrder: 5 + m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} @@ -2944,7 +2989,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 456.4, y: 0} + m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 912.8, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!114 &3795659575372293691 @@ -3087,7 +3132,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 8601325964190918751} - m_RootOrder: 7 + m_RootOrder: 8 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureStrongPopup.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureStrongPopup.lua index 768c483bc6..449576d255 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureStrongPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/EquipTreasureStrongPopup.lua @@ -25,6 +25,8 @@ function EquipTreasureStrongPopup:InitComponent() this.secondScroll=Util.GetGameObject(this.content,"secondScroll") this.properItemPre = Util.GetGameObject( this.secondScroll,"propertyPre") this.propertyGrid=Util.GetGameObject(this.secondScroll,"grid") + this.costItemPre=Util.GetGameObject(this.content,"costItemPre") + this.costPreList = {} this.costItemGrid=Util.GetGameObject(this.content,"costGrid") this.hintTxt=Util.GetGameObject(this.content,"hintTxt"):GetComponent("Text") this.btnGrid=Util.GetGameObject(this.content,"btnGrid") @@ -395,8 +397,11 @@ function EquipTreasureStrongPopup:CostShow(items) if not items[i] then this.costItemPreList[i].gameObject:SetActive(false) else + if not this.costPreList[i] then + this.costPreList[i] = newObjToParent(this.costItemPre,this.costItemGrid) + end if not this.costItemPreList[i] then - this.costItemPreList[i] = SubUIManager.Open(SubUIConfig.ItemView,this.costItemGrid.transform) + this.costItemPreList[i] = SubUIManager.Open(SubUIConfig.ItemView,this.costPreList[i].transform) end this.costItemPreList[i].gameObject:SetActive(true) if items[i].id==curEquipData.id then @@ -494,6 +499,8 @@ function EquipTreasureStrongPopup:OnDestroy() SubUIManager.Close(this.costItemPreList[i]) end this.costItemPreList = {} + Util.ClearChild(this.costItemGrid.transform) + this.costPreList = {} for k,v in pairs(this.treasureDatas) do SubUIManager.Close(v) end