From 0842438fdf6183dc732b7cf2883dad773dbc43b6 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Mon, 27 Sep 2021 10:34:03 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=A3=85=E5=A4=87=E5=88=86=E8=A7=A3?= =?UTF-8?q?=E3=80=91=E4=B8=8D=E5=8F=AF=E5=88=86=E8=A7=A3=E7=99=BD=E9=87=91?= =?UTF-8?q?=E8=A3=85=E5=A4=87and=E5=A2=9E=E5=8A=A0mask=E7=82=B9=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Popup/RewardEquipSingleShowPopup.prefab | 47 ++++++++++++++++++- .../Popup/RewardEquipSingleShowPopup.lua | 10 +++- 2 files changed, 53 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Popup/RewardEquipSingleShowPopup.prefab b/Assets/ManagedResources/Prefabs/UI/Popup/RewardEquipSingleShowPopup.prefab index 3013243d87..62c9099e23 100644 --- a/Assets/ManagedResources/Prefabs/UI/Popup/RewardEquipSingleShowPopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Popup/RewardEquipSingleShowPopup.prefab @@ -777,6 +777,7 @@ GameObject: - component: {fileID: 224387383327253788} - component: {fileID: 222318799171858828} - component: {fileID: 114297479066713840} + - component: {fileID: 4638913338301940791} m_Layer: 5 m_Name: mask m_TagString: Untagged @@ -840,6 +841,48 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!114 &4638913338301940791 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1322871620042112} + 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: 0 + 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: 114297479066713840} + 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 &1386413588142900 GameObject: m_ObjectHideFlags: 0 @@ -1983,7 +2026,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: -1.532408, y: 151} + m_AnchoredPosition: {x: -1.532408, y: 127} m_SizeDelta: {x: 898.92, y: 4.4399414} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &222364860673536954 @@ -2429,7 +2472,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} m_AnchorMax: {x: 0.5, y: 0} - m_AnchoredPosition: {x: -0.7999879, y: 77.399994} + m_AnchoredPosition: {x: 0, y: 65} m_SizeDelta: {x: 260, y: 74} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &4228199186515430296 diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup.lua index 94b3023bd9..52b2418e12 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardEquipSingleShowPopup.lua @@ -50,6 +50,8 @@ function RewardEquipSingleShowPopup:InitComponent() this.btnLock = Util.GetGameObject(self.transform, "Content/bg/btnLock") this.upLockImage = Util.GetGameObject(self.transform, "Content/bg/btnLock/upLock") this.downLockImage = Util.GetGameObject(self.transform, "Content/bg/btnLock/downLock") + + this.mask = Util.GetGameObject(self.transform, "mask") end --绑定事件(用于子类重写) @@ -59,6 +61,10 @@ function RewardEquipSingleShowPopup:BindEvent() PlaySoundWithoutClick(SoundConfig.Sound_UICancel) self:ClosePanel() end) + Util.AddClick(this.mask, function() + PlaySoundWithoutClick(SoundConfig.Sound_UICancel) + self:ClosePanel() + end) Util.AddClick(this.btnJump, function() if equipData.itemConfig then JumpManager.GoJump(equipData.itemConfig.UseJump) @@ -117,7 +123,7 @@ function RewardEquipSingleShowPopup:OnOpen(_equipData, _func,_isRewardItemPop,_i equipData=_equipData func=_func isRewardItemPop = _isRewardItemPop and _isRewardItemPop or false - isShowfenjie = not not (_isShowfenjie or false) + -- isShowfenjie = not not (_isShowfenjie or false) end function RewardEquipSingleShowPopup:OnShow() @@ -126,7 +132,7 @@ function RewardEquipSingleShowPopup:OnShow() -- LogBlue(tonumber(equipData.id)) local equipConfigData=ConfigManager.GetConfigData(ConfigName.EquipConfig, tonumber(equipData.id)) local itemConfigData=ConfigManager.GetConfigData(ConfigName.ItemConfig, tonumber(equipData.id)) - this.btnSure:SetActive(isShowfenjie) + this.btnSure:SetActive(itemConfigData.IfResolve==1) --local curEquipData = {} -- if func and itemConfigData.IfResolve==1 then -- curEquipData = EquipManager.GetSingleEquipData(equipData.id)