From a0fedc60ad79efbf0823834296798fd1d87c7868 Mon Sep 17 00:00:00 2001 From: xiekaidong Date: Wed, 12 Jul 2023 17:35:23 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=95=8C=E9=9D=A2=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E9=93=BE=E6=8E=A5=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/ui/game_setting/game_setting_ui.lua | 32 +++++++++++++++------ 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/lua/app/ui/game_setting/game_setting_ui.lua b/lua/app/ui/game_setting/game_setting_ui.lua index c990f0fd..1df6f3c4 100644 --- a/lua/app/ui/game_setting/game_setting_ui.lua +++ b/lua/app/ui/game_setting/game_setting_ui.lua @@ -271,11 +271,10 @@ function GameSettingUI:refreshLinkBtns() local bg = uiMap["game_setting_ui.bg"] local node = uiMap["game_setting_ui.bg.community_node"] local curLanguage = I18N:getCurLanguage() - local showLinkBtns = false - if GameSettingConst.COMMUNITY_URL[curLanguage] then - showLinkBtns = true + if not GameSettingConst.COMMUNITY_URL[curLanguage] then + curLanguage = GConst.LANGUAGE.ENGLISH end - if not showLinkBtns then + if not GameSettingConst.COMMUNITY_URL[curLanguage] then bg:setSizeDeltaY(BG_DEFAULT_H) node:setVisible(false) return @@ -288,6 +287,11 @@ function GameSettingUI:refreshLinkBtns() local socialBtn = uiMap["game_setting_ui.bg.community_node.facebook"] communityDesc:setText(I18N:getGlobalText(GameSettingConst.COMMUNITY_TXT[curLanguage])) + if I18N:getCurLanguage() == GConst.LANGUAGE.KOREAN then -- 韩国特殊处理 + communityDesc:setVisible(false) + else + communityDesc:setVisible(true) + end communityBtn:addClickListener(function() local url = GameSettingConst.COMMUNITY_URL[I18N:getCurLanguage()] if not url then @@ -295,10 +299,14 @@ function GameSettingUI:refreshLinkBtns() end GFunc.openUrl(url) end) - communityBtn:setVisible(false) - communityBtn:setSprite(GConst.ATLAS_PATH.UI_SETTING, GameSettingConst.COMMUNITY_ICON[curLanguage], function() - communityBtn:setVisible(true) - end) + if I18N:getCurLanguage() == GConst.LANGUAGE.KOREAN then -- 韩国特殊处理 + communityBtn:setVisible(false) + else + communityBtn:setVisible(false) + communityBtn:setSprite(GConst.ATLAS_PATH.UI_SETTING, GameSettingConst.COMMUNITY_ICON[curLanguage], function() + communityBtn:setVisible(true) + end) + end socialDesc:setText(I18N:getGlobalText(GameSettingConst.SOCIAL_DESC[curLanguage])) socialBtn:addClickListener(function() @@ -312,6 +320,14 @@ function GameSettingUI:refreshLinkBtns() socialBtn:setSprite(GConst.ATLAS_PATH.UI_SETTING, GameSettingConst.SOCIAL_ICON[curLanguage], function() socialBtn:setVisible(true) end) + + if I18N:getCurLanguage() == GConst.LANGUAGE.KOREAN then -- 韩国特殊处理 + socialDesc:setAnchoredPositionX(100.5) + socialBtn:setAnchoredPositionX(296) + else + socialDesc:setAnchoredPositionX(15) + socialBtn:setAnchoredPositionX(210.5) + end end return GameSettingUI \ No newline at end of file