From 7f65810d70fb0a09f504afcb8153ef98dc3f2cd8 Mon Sep 17 00:00:00 2001 From: yuanshuai <243578945@qq.com> Date: Wed, 6 Jul 2022 11:40:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9D=E7=AE=B1=E6=B7=BB=E5=8A=A0=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/Popup/GeneralPopup.prefab | 47 ++++++++++++++++++- .../Popup/View/GeneralPopup_RecruitBox.lua | 4 ++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Popup/GeneralPopup.prefab b/Assets/ManagedResources/Prefabs/UI/Popup/GeneralPopup.prefab index f18d259e89..8acc4a0a7f 100644 --- a/Assets/ManagedResources/Prefabs/UI/Popup/GeneralPopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Popup/GeneralPopup.prefab @@ -37022,7 +37022,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!224 &5148739484638376218 RectTransform: m_ObjectHideFlags: 0 @@ -51277,6 +51277,7 @@ GameObject: - component: {fileID: 6743334599692215934} - component: {fileID: 4942739253467920590} - component: {fileID: 4047812234912289829} + - component: {fileID: 7620457998452544379} m_Layer: 5 m_Name: boxIcon m_TagString: Untagged @@ -51325,7 +51326,7 @@ MonoBehaviour: m_EditorClassIdentifier: m_Material: {fileID: 0} m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 0 + m_RaycastTarget: 1 m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] @@ -51359,6 +51360,48 @@ Animator: m_HasTransformHierarchy: 1 m_AllowConstantClipSamplingOptimization: 1 m_KeepAnimatorControllerStateOnDisable: 0 +--- !u!114 &7620457998452544379 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7739183248647446308} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 4942739253467920590} + m_OnClick: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null --- !u!1 &7748943483106170027 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitBox.lua b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitBox.lua index 72a169baf0..b7842b78f1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitBox.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/View/GeneralPopup_RecruitBox.lua @@ -22,6 +22,7 @@ function this:InitComponent(gameObject) this.okBtnTxt=Util.GetGameObject(gameObject,"OkBtn/Text"):GetComponent("Text") this.okBtnTxt.text="领 取" this.anim = Util.GetGameObject(gameObject, "Body/boxIcon"):GetComponent("Animator") + this.boxBtn = Util.GetGameObject(gameObject, "Body/boxIcon") end function this:BindEvent() @@ -41,6 +42,9 @@ function this:BindEvent() --this:ShowInfo() end) end) + Util.AddClick(this.boxBtn,function() + UIManager.OpenPanel(UIName.RewardBoxPanel,nil,81185) + end) end