This commit is contained in:
Fang 2023-08-21 15:53:22 +08:00
parent a68c4c79f2
commit 7b0f71065f

View File

@ -45,6 +45,7 @@ end
function MopUpUI:_display() function MopUpUI:_display()
local uiMap = self.root:genAllChildren() local uiMap = self.root:genAllChildren()
self.btnOk = uiMap["mop_up_ui.bg.ok_btn"] self.btnOk = uiMap["mop_up_ui.bg.ok_btn"]
self.btnClose = uiMap["mop_up_ui.bg.close_btn"]
uiMap["mop_up_ui.bg.title_text"]:setText(self.customtitleTx or I18N:getGlobalText(I18N.GlobalConst.MOP_UP_DESC_1)) uiMap["mop_up_ui.bg.title_text"]:setText(self.customtitleTx or I18N:getGlobalText(I18N.GlobalConst.MOP_UP_DESC_1))
uiMap["mop_up_ui.bg.tx_none"]:setText(I18N:getGlobalText(I18N.GlobalConst.GET_REWARDS_DESC)) uiMap["mop_up_ui.bg.tx_none"]:setText(I18N:getGlobalText(I18N.GlobalConst.GET_REWARDS_DESC))
@ -63,8 +64,7 @@ function MopUpUI:_display()
end end
function MopUpUI:_addListeners() function MopUpUI:_addListeners()
local uiMap = self.root:genAllChildren() self.btnClose:addClickListener(function()
uiMap["mop_up_ui.bg.close_btn"]:addClickListener(function()
self:closeUI() self:closeUI()
end) end)
@ -137,6 +137,7 @@ function MopUpUI:showRewardAppearAnim(idx, cell)
cell:setTouchEnable(false) cell:setTouchEnable(false)
self.btnOk:setTouchEnable(false) self.btnOk:setTouchEnable(false)
self.btnClose:setTouchEnable(false)
local animRewardAppear = selfObj:createBindTweenSequence() local animRewardAppear = selfObj:createBindTweenSequence()
animRewardAppear:Insert(0, canvasGroup:DOFade(0, 0)) animRewardAppear:Insert(0, canvasGroup:DOFade(0, 0))
animRewardAppear:Insert(0, selfObj:getTransform():DOScale(scaleX * 0.6, 0)) animRewardAppear:Insert(0, selfObj:getTransform():DOScale(scaleX * 0.6, 0))
@ -148,6 +149,7 @@ function MopUpUI:showRewardAppearAnim(idx, cell)
cell:setTouchEnable(true) cell:setTouchEnable(true)
self:performWithDelayGlobal(function() self:performWithDelayGlobal(function()
self.btnOk:setTouchEnable(true) self.btnOk:setTouchEnable(true)
self.btnClose:setTouchEnable(true)
end, 0.5) end, 0.5)
end) end)
return animRewardAppear return animRewardAppear