From ce4f27e7cadd33b5bdeeecd6b8523a7cb8f0ff0f Mon Sep 17 00:00:00 2001 From: wangzhenxing <1545929779@qq.com> Date: Sun, 21 Jan 2024 00:05:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=B1=E9=9B=84=E7=BD=AE=E6=8D=A2=E5=8D=A1?= =?UTF-8?q?=E7=95=8C=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/Popup/HeroReplacePopup.prefab | 161 ++++++++++++++---- .../~Lua/Modules/Popup/HeroReplacePopup.lua | 6 + 2 files changed, 132 insertions(+), 35 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Popup/HeroReplacePopup.prefab b/Assets/ManagedResources/Prefabs/UI/Popup/HeroReplacePopup.prefab index aae6e75a08..4ff9fee14a 100644 --- a/Assets/ManagedResources/Prefabs/UI/Popup/HeroReplacePopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Popup/HeroReplacePopup.prefab @@ -66,7 +66,7 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} m_FontSize: 34 m_FontStyle: 0 m_BestFit: 0 @@ -305,9 +305,9 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} m_FontSize: 50 - m_FontStyle: 0 + m_FontStyle: 2 m_BestFit: 0 m_MinSize: 0 m_MaxSize: 50 @@ -317,7 +317,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: "\u7F6E \u6362" + m_Text: "\u7F6E\u6362" --- !u!1 &1191524101974221711 GameObject: m_ObjectHideFlags: 0 @@ -384,7 +384,7 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} m_FontSize: 28 m_FontStyle: 0 m_BestFit: 0 @@ -720,6 +720,7 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: - {fileID: 8392771984709511509} + - {fileID: 4894723892085485512} - {fileID: 6560276649406405426} m_Father: {fileID: 4154842809190631123} m_RootOrder: 1 @@ -803,9 +804,9 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} m_FontSize: 50 - m_FontStyle: 0 + m_FontStyle: 2 m_BestFit: 0 m_MinSize: 0 m_MaxSize: 50 @@ -815,7 +816,7 @@ MonoBehaviour: m_HorizontalOverflow: 1 m_VerticalOverflow: 1 m_LineSpacing: 1 - m_Text: "\u53D6 \u6D88" + m_Text: "\u53D6\u6D88" --- !u!1 &2523136437790525557 GameObject: m_ObjectHideFlags: 0 @@ -1000,12 +1001,12 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 4197180768976209588} - m_RootOrder: 1 + m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 424.7, y: 623.4} - m_SizeDelta: {x: 154, y: 120} + m_AnchoredPosition: {x: 405.6, y: 608.65} + m_SizeDelta: {x: 94, y: 94} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4866162194008116717 CanvasRenderer: @@ -1035,7 +1036,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 87b3cd7ab5ab3854db979a44d7e17767, type: 3} + m_Sprite: {fileID: 21300000, guid: 58d829c46f84cc24bbcbbdb99411714c, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -1179,6 +1180,80 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!1 &2913561221117121632 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 4894723892085485512} + - component: {fileID: 2126709345332377637} + - component: {fileID: 1343116035904284760} + m_Layer: 5 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &4894723892085485512 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2913561221117121632} + 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: 4197180768976209588} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: -97, y: 605} + m_SizeDelta: {x: 750, y: 71} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &2126709345332377637 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2913561221117121632} + m_CullTransparentMesh: 0 +--- !u!114 &1343116035904284760 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2913561221117121632} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, 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 + m_Sprite: {fileID: 21300000, guid: 895edaf5020aff14bb6181683b0ba980, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 --- !u!1 &2941080668938719211 GameObject: m_ObjectHideFlags: 0 @@ -1419,7 +1494,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &3013238410475559728 RectTransform: m_ObjectHideFlags: 0 @@ -1468,7 +1543,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: e1eb5a78b93294840889587d72740102, type: 3} + m_Sprite: {fileID: 21300000, guid: 2df2051012458ac4483650ef3edb3a81, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -1542,8 +1617,8 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 60da54ea70faabc49823d0462d3ae80d, type: 3} - m_Type: 1 + m_Sprite: {fileID: 21300000, guid: a9cf5792d692a824ea0eacc1e9fd42e0, type: 3} + m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 @@ -1617,7 +1692,7 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} m_FontSize: 34 m_FontStyle: 0 m_BestFit: 0 @@ -1698,7 +1773,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 899d77ec337556943b30b2365195276b, type: 3} + m_Sprite: {fileID: 21300000, guid: b204bd77afb57e14e830d912e88eb357, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -2327,7 +2402,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 22a363a0a33620f419259e82ebf04f91, type: 3} + m_Sprite: {fileID: 21300000, guid: 6ff20609e8c68014394e6b730e1c7948, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -2408,6 +2483,7 @@ GameObject: - component: {fileID: 1772383436684435066} - component: {fileID: 7839883667626213681} - component: {fileID: 3025363076607906536} + - component: {fileID: 1714967497027728577} m_Layer: 5 m_Name: TitleText m_TagString: Untagged @@ -2431,7 +2507,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 638.6} + m_AnchoredPosition: {x: 0, y: 648} m_SizeDelta: {x: 384.31, y: 64.41} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7839883667626213681 @@ -2455,7 +2531,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.92549026, g: 0.8588236, b: 0.74509805, a: 1} + m_Color: {r: 0.9811321, g: 0.9725804, b: 0.9579922, a: 1} m_RaycastTarget: 0 m_OnCullStateChanged: m_PersistentCalls: @@ -2463,9 +2539,9 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} - m_FontSize: 45 - m_FontStyle: 0 + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} + m_FontSize: 42 + m_FontStyle: 2 m_BestFit: 0 m_MinSize: 4 m_MaxSize: 50 @@ -2477,6 +2553,21 @@ MonoBehaviour: m_LineSpacing: 1 m_Text: "\u4F20\u8BF4\u795E\u5C06\u7F6E\u6362\u5361" LanguageIndex: 11248 +--- !u!114 &1714967497027728577 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 4485366333885894747} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -900027084, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_EffectColor: {r: 0, g: 0, b: 0, a: 1} + m_EffectDistance: {x: 1, y: -1} + m_UseGraphicAlpha: 1 --- !u!1 &4814339969507582334 GameObject: m_ObjectHideFlags: 0 @@ -3489,7 +3580,7 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} m_FontSize: 40 m_FontStyle: 0 m_BestFit: 0 @@ -3536,7 +3627,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -3.5, y: 349} + m_AnchoredPosition: {x: 0, y: 349} m_SizeDelta: {x: 907, y: 100} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &4402775574377891907 @@ -3567,8 +3658,8 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: b44f71f84aa20084a9ed3a8ef44c483c, type: 3} - m_Type: 1 + m_Sprite: {fileID: 21300000, guid: a40c39d20c3dbcb419e836a687d8dcdd, type: 3} + m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 m_FillMethod: 4 @@ -3856,7 +3947,7 @@ MonoBehaviour: m_Name: m_EditorClassIdentifier: m_Material: {fileID: 0} - m_Color: {r: 0.9882353, g: 0.92156863, b: 0.7921569, a: 1} + m_Color: {r: 0.6037736, g: 0.42823717, b: 0.10537558, a: 1} m_RaycastTarget: 0 m_OnCullStateChanged: m_PersistentCalls: @@ -3864,7 +3955,7 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3} + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} m_FontSize: 30 m_FontStyle: 0 m_BestFit: 0 @@ -3876,7 +3967,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: "\u65E0\u7B26\u5408\u8981\u6C42\u7684\u795E\u5C06\uFF01" + m_Text: "\u65E0\u7B26\u5408\u8981\u6C42\u7684\u82F1\u96C4\uFF01" LanguageIndex: 10642 --- !u!1 &7445168056031498563 GameObject: @@ -4018,7 +4109,7 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} m_FontSize: 28 m_FontStyle: 0 m_BestFit: 0 @@ -4066,7 +4157,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: -239.59998, y: 90.5} + m_AnchoredPosition: {x: -315, y: 134} m_SizeDelta: {x: 402, y: 234} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &2145430036562647890 @@ -4097,7 +4188,7 @@ MonoBehaviour: m_Calls: [] m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - m_Sprite: {fileID: 21300000, guid: 88785b6606f773e43bfb8d365c2689ab, type: 3} + m_Sprite: {fileID: 21300000, guid: 6f9a2d5a1d9e8a64abe8a4e1c5d9c8e5, type: 3} m_Type: 0 m_PreserveAspect: 0 m_FillCenter: 1 @@ -4289,7 +4380,7 @@ MonoBehaviour: m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null m_FontData: - m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_Font: {fileID: 12800000, guid: be22547d075a3fa439f78ce38cdb4beb, type: 3} m_FontSize: 28 m_FontStyle: 0 m_BestFit: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/HeroReplacePopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/HeroReplacePopup.lua index 291ca5452e..c502cfeac2 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/HeroReplacePopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/HeroReplacePopup.lua @@ -14,6 +14,7 @@ function this:InitComponent() this.spLoader = SpriteLoader.New() this.titleText=Util.GetGameObject(gameObject,"TitleText"):GetComponent("Text") this.titleText.text="英雄置换卡" + this.emptyObj=Util.GetGameObject(self.transform,"GeneralPopup_HomeLandEquip/Scroll/Empty") this.replaceBtn = Util.GetGameObject(gameObject,"replaceBtn") this.cancelBtn = Util.GetGameObject(gameObject,"cancelBtn") @@ -90,6 +91,11 @@ function this:OnOpen(_heroChangeId) end end end + if #dataList==0 then + this.emptyObj:SetActive(true) + else + this.emptyObj:SetActive(false) + end this.SetHeroList(dataList) curSelectGridHero=this.curGridHero this.SetGridSelect(this.curGridBtn)