From 0ebb735e8f5dbb734bddb1d71b09ec50b2181b1f Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Mon, 28 Aug 2023 14:12:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=81=E5=8F=B7=E5=88=A0=E9=99=A4=E8=B4=A6?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/account/account_manager.lua | 4 ++-- lua/app/module/login/login_manager.lua | 2 +- lua/app/ui/game_setting/account_delete_ui.lua | 7 +++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lua/app/module/account/account_manager.lua b/lua/app/module/account/account_manager.lua index 9bfea8ae..bb238678 100644 --- a/lua/app/module/account/account_manager.lua +++ b/lua/app/module/account/account_manager.lua @@ -4,8 +4,8 @@ function AccountManager:showBindUI() UIManager:showUI("app/ui/game_setting/account_binding_ui") end -function AccountManager:showDeleteUI() - return UIManager:showUI("app/ui/game_setting/account_delete_ui") +function AccountManager:showDeleteUI(hideCloseBtn) + return UIManager:showUI("app/ui/game_setting/account_delete_ui", {hideCloseBtn = hideCloseBtn}) end function AccountManager:getIsBinded() diff --git a/lua/app/module/login/login_manager.lua b/lua/app/module/login/login_manager.lua index ea4af29c..cc42c279 100644 --- a/lua/app/module/login/login_manager.lua +++ b/lua/app/module/login/login_manager.lua @@ -193,7 +193,7 @@ function LoginManager:loginFinish(data) end, cancelText = I18N:getGlobalText(I18N.GlobalConst.SEIZED_DESC_3), cancelFunc = function() - ModuleManager.AccountManager:deleteAccount() + ModuleManager.AccountManager:showDeleteUI(true) end } GFunc.showMessageBox(params) diff --git a/lua/app/ui/game_setting/account_delete_ui.lua b/lua/app/ui/game_setting/account_delete_ui.lua index 7ba88c5f..6a979c28 100644 --- a/lua/app/ui/game_setting/account_delete_ui.lua +++ b/lua/app/ui/game_setting/account_delete_ui.lua @@ -18,8 +18,9 @@ function AccountDeleteUI:onClose() end end -function AccountDeleteUI:ctor() +function AccountDeleteUI:ctor(params) self.besureTxStr = I18N:getGlobalText(I18N.GlobalConst.BESURE_DELETE_ACCOUNT_DESC) + self.hideCloseBtn = params and params.hideCloseBtn end function AccountDeleteUI:onLoadRootComplete() @@ -36,9 +37,11 @@ function AccountDeleteUI:onLoadRootComplete() end end) - uiMap["account_delete_ui.title_bg_img.close_btn"]:addClickListener(function() + local closeBtn = uiMap["account_delete_ui.title_bg_img.close_btn"] + closeBtn:addClickListener(function() self:closeUI() end) + closeBtn:setActive(not self.hideCloseBtn) self:_display() end