From 3eb84202f2e7dece377ad545be67c6b6092fc5df Mon Sep 17 00:00:00 2001 From: gaoxin Date: Thu, 3 Jun 2021 23:03:09 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=99=BB=E5=BD=95=E3=80=91=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=89=B9=E6=95=88=E4=BE=9D=E7=84=B6=E5=86=8D=E5=96=9C?= =?UTF-8?q?=E6=89=91=E7=9A=84=E5=8C=85=E9=87=8C=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Login/LoginPanel.lua | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua index a7747b9cdc..334f6d839b 100644 --- a/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Login/LoginPanel.lua @@ -32,10 +32,6 @@ function this:InitComponent() orginLayer = 0 this.loginPart = this.gameObject - local bg = Util.GetGameObject(this.gameObject, "bg"):GetComponent("Image") - local bgStr = PackageManager.GetLoginPanelBg() - bg.sprite = this.spLoader:LoadSprite(bgStr) - this.tip = Util.GetGameObject(this.loginPart, "tip/Text") this.loginAnim = this.gameObject:GetComponent("Animator") @@ -63,15 +59,19 @@ function this:InitComponent() this.versionText = Util.GetGameObject(this.loginPart, "version"):GetComponent("Text") this.versionText.text = Language[11136]..LoginRoot_Version - + -- 背景 + local bg = Util.GetGameObject(this.gameObject, "bg"):GetComponent("Image") + this.bgStr = PackageManager.GetLoginPanelBg() + if this.bgStr then + bg.sprite = this.spLoader:LoadSprite(this.bgStr) + end + -- logo this.logo = Util.GetGameObject(this.gameObject, "logo"):GetComponent("Image") - local logoStr = PackageManager.GetLoginPanelLogo() - if logoStr then + this.logoStr = PackageManager.GetLoginPanelLogo() + if this.logoStr then this.logo.gameObject:SetActive(true) - this.logo.sprite = this.spLoader:LoadSprite(logoStr) + this.logo.sprite = this.spLoader:LoadSprite(this.logoStr) this.logo:SetNativeSize() - -- 特效只有在特殊背景显示 - Util.GetGameObject(this.btnLoginPart, "effect (1)"):SetActive(logoStr == "dl_ui_effect_bg") else this.logo.gameObject:SetActive(false) end @@ -681,7 +681,7 @@ end function this.SetLoginPart(flag) this.loginAnim.enabled = flag - this.btnLoginPart:SetActive(flag) + this.btnLoginPart:SetActive(flag and tostring(this.bgStr) == "dl_ui_effect_bg") this.btnLogin:SetActive(flag) this.serverSelectPart:SetActive(flag) end