From 4d907f1530c0d17dd49ebb1facd8f8fcc1717348 Mon Sep 17 00:00:00 2001 From: gaoxin Date: Thu, 30 Sep 2021 15:01:19 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=A3=85=E5=A4=87=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E3=80=91=E7=A7=BB=E9=99=A4=E6=9B=BF=E6=8D=A2?= =?UTF-8?q?=E8=A3=85=E5=A4=87=E5=92=8C=E5=AE=9D=E7=89=A9=E6=97=B6=E4=B8=8A?= =?UTF-8?q?=E6=96=B9=E7=9A=84=E5=BD=93=E5=89=8D=E8=A3=85=E5=A4=87/?= =?UTF-8?q?=E5=AE=9D=E7=89=A9=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RoleEquipTreasureChangePopup.prefab | 47 +++++++++++++++---- .../RoleInfo/RoleEquipTreasureChangePopup.lua | 34 +++++++++----- 2 files changed, 60 insertions(+), 21 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipTreasureChangePopup.prefab b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipTreasureChangePopup.prefab index b01b0cd82c..7451aa5b35 100644 --- a/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipTreasureChangePopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/RoleInfo/RoleEquipTreasureChangePopup.prefab @@ -6190,7 +6190,7 @@ GameObject: m_Component: - component: {fileID: 4359914458629875902} - component: {fileID: 8731133703960744836} - - component: {fileID: 3426296151460317093} + - component: {fileID: 7936536668454696432} m_Layer: 5 m_Name: grid m_TagString: Untagged @@ -6231,7 +6231,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 2 m_VerticalFit: 2 ---- !u!114 &3426296151460317093 +--- !u!114 &7936536668454696432 MonoBehaviour: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -6240,7 +6240,7 @@ MonoBehaviour: m_GameObject: {fileID: 4711509158456914778} m_Enabled: 1 m_EditorHideFlags: 0 - m_Script: {fileID: -2095666955, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Script: {fileID: 1297475563, guid: f70555f144d8491a825f0804e09c671c, type: 3} m_Name: m_EditorClassIdentifier: m_Padding: @@ -6249,12 +6249,11 @@ MonoBehaviour: m_Top: 0 m_Bottom: 0 m_ChildAlignment: 0 - m_StartCorner: 0 - m_StartAxis: 0 - m_CellSize: {x: 300, y: 70} - m_Spacing: {x: 0, y: 0} - m_Constraint: 1 - m_ConstraintCount: 2 + m_Spacing: 10 + m_ChildForceExpandWidth: 0 + m_ChildForceExpandHeight: 0 + m_ChildControlWidth: 0 + m_ChildControlHeight: 1 --- !u!1 &4791891485388994591 GameObject: m_ObjectHideFlags: 0 @@ -8678,6 +8677,8 @@ GameObject: - component: {fileID: 943260969191809704} - component: {fileID: 6137256389977648411} - component: {fileID: 6955592475483671236} + - component: {fileID: 8546950356663897845} + - component: {fileID: 2586372359017961132} m_Layer: 5 m_Name: grid m_TagString: Untagged @@ -8746,6 +8747,34 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 0 m_VerticalFit: 2 +--- !u!222 &8546950356663897845 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7567570191903525415} + m_CullTransparentMesh: 0 +--- !u!114 &2586372359017961132 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7567570191903525415} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e459a084d8e15a240b58db751097122b, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null --- !u!1 &7594128942883833027 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipTreasureChangePopup.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipTreasureChangePopup.lua index 1b9585f7dd..d3462d8024 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipTreasureChangePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleEquipTreasureChangePopup.lua @@ -61,6 +61,7 @@ function RoleEquipTreasureChangePopup:InitComponent() this.treasurePanel[i].RefineRed = Util.GetGameObject(this.treasurePanel[i].EquipBtnRefine, "red") --属性信息 this.treasurePanel[i].bgScroll = Util.GetGameObject(this.treasurePanel[i].bg, "Scroll") + this.treasurePanel[i].bgScrollContent = Util.GetGameObject(this.treasurePanel[i].bg, "Scroll/grid") --基础 this.treasurePanel[i].BaseAttri = Util.GetGameObject(this.treasurePanel[i].bg, "Scroll/grid/baseAttri") this.treasurePanel[i].BaseAttriNum = Util.GetGameObject(this.treasurePanel[i].BaseAttri, "name/attriNum"):GetComponent("Text") @@ -237,7 +238,7 @@ function RoleEquipTreasureChangePopup:OnShow() this.ShowEquipData(1) end - this.treasurePanel[1].bg:SetActive(true) + this.treasurePanel[1].bg:SetActive(type ~= 3) this.treasurePanel[1].EquipBtns:SetActive((type == 1) or (type == 2)) this.treasurePanel[2].EquipBtns:SetActive(type == 3) this.treasurePanel[1].EquipBtnAdd:SetActive(type == 1) @@ -377,15 +378,6 @@ function this.ShowEquipData(i) local baseInfo = EquipTreasureManager.GetCurLvPropertyValue(1,equipData[i].levelPool,equipData[i].lv) this.treasurePanel[i].BaseAttriNum.text = string.format("[强化等级:%s/%s]",equipData[i].lv,equipData[i].maxLv) this.SetPropertyShow1(baseInfo,this.BasePropertyList[i],this.treasurePanel[i].BaseAttriGrid) - if equipData[i].upHeroDid == "" or equipData[i].upHeroDid == "0" then - this.treasurePanel[i].strongAttri.gameObject:SetActive(false) - this.treasurePanel[i].refineMasterAttri:SetActive(false) - else - --强化共鸣 - this.GongMingSetData(1,this.strongPropertyList[i],this.treasurePanel[i].strongAttriGrid,this.treasurePanel[i].strongAttriNum,this.treasurePanel[i].strongAttri) - --精炼共鸣 - this.GongMingSetData(2,this.RefineMonsterPropertyList[i],this.treasurePanel[i].refineMasterAttriGrid,this.treasurePanel[i].refineMasterAttriNum,this.treasurePanel[i].refineMasterAttri) - end --(精炼属性) local refineInfo = EquipTreasureManager.GetCurLvPropertyValue(2,equipData[i].refinePool,equipData[i].refineLv,true) this.treasurePanel[i].RefineAttriNum.text = string.format("[精炼等级:%s/%s]",equipData[i].refineLv,equipData[i].maxRefineLv) @@ -396,10 +388,25 @@ function this.ShowEquipData(i) this.treasurePanel[i].bgScroll:GetComponent("RectTransform").sizeDelta = Vector2.New(800,250) this.SetPropertyShow1(refineInfo,this.RefinePropertyList[i],this.treasurePanel[i].RefineAttriGrid) end + if equipData[i].upHeroDid == "" or equipData[i].upHeroDid == "0" then + this.treasurePanel[i].strongAttri.gameObject:SetActive(false) + this.treasurePanel[i].refineMasterAttri:SetActive(false) + else + --强化共鸣 + local _QH = this.GongMingSetData(1,this.strongPropertyList[i],this.treasurePanel[i].strongAttriGrid,this.treasurePanel[i].strongAttriNum,this.treasurePanel[i].strongAttri) + --精炼共鸣 + local _JL = this.GongMingSetData(2,this.RefineMonsterPropertyList[i],this.treasurePanel[i].refineMasterAttriGrid,this.treasurePanel[i].refineMasterAttriNum,this.treasurePanel[i].refineMasterAttri) + -- 判断显示界面高度 + local height = 250 + height = _QH and height + 110 or height + height = _JL and height + 110 or height + this.treasurePanel[i].bgScroll:GetComponent("RectTransform").sizeDelta = Vector2.New(800,height) + end --(神应属性) local treeInfo=SacredTreeManager.GetCurLvPropertyValue(3,equipData[i].treePool,equipData[i].treeLv or 0) 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 (equipData[i].treeLv < 1 and SacredTreeManager.CulAttri(equipData[1]) < 1) then + --if equipData[i].upHeroDid == "" or equipData[i].upHeroDid == "0" or (equipData[i].treeLv < 1 and SacredTreeManager.CulAttri(equipData[1]) < 1) then + if (equipData[i].treeLv < 1 and SacredTreeManager.CulAttri(equipData[1]) < 1) then this.treasurePanel[i].TreeAttri:SetActive(false) else this.treasurePanel[i].TreeAttri:SetActive(true) @@ -410,7 +417,9 @@ function this.ShowEquipData(i) this.treasurePanel[i].StrongRed:SetActive(HeroManager.CheckIsUpTreasure(equipData[i].idDyn,1)) this.treasurePanel[i].RefineRed:SetActive(HeroManager.CheckIsUpTreasure(equipData[i].idDyn,2)) end - + + -- 内容置顶 + this.treasurePanel[i].bgScrollContent.transform.localPosition = Vector2.New(0, 0) end function this.GongMingSetData(curTabIndex,proPreList,grid,title,go) @@ -495,6 +504,7 @@ function this.GongMingSetData(curTabIndex,proPreList,grid,title,go) proPreList[i].transform:GetComponent("Text").text = string.format("%s",str) end end + return true end --神应专用