From bd6aa57fa17fdab66f1d42e651f734e29eac2350 Mon Sep 17 00:00:00 2001 From: chenxi Date: Fri, 16 Jun 2023 17:15:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/first/first.lua | 24 ++++++++++++++++++++++-- lua/app/ui/battle/battle_result_ui.lua | 3 ++- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/lua/app/first/first.lua b/lua/app/first/first.lua index 0fbe2b8c..40d19c82 100644 --- a/lua/app/first/first.lua +++ b/lua/app/first/first.lua @@ -37,8 +37,8 @@ local LANGUAGES = { -- ["th"] = "th_TH", -- ["id"] = "in_ID", -- ["vi"] = "vi_VN", - -- ["ja"] = "ja_JP", - -- ["ko"] = "ko_KR", + ["ja"] = "ja_JP", + ["ko"] = "ko_KR", } function First:init() @@ -258,18 +258,38 @@ function First:loadFirstUI() local logoEn = self.firstUI.transform:Find("logo_en") local logoZH = self.firstUI.transform:Find("logo_zh") local logoCn = self.firstUI.transform:Find("logo_cn") + local logoKO = self.firstUI.transform:Find("logo_ko") + local logoJA = self.firstUI.transform:Find("logo_ja") if self.language == "zh" then logoZH.localScale = VISIBLE_SCALE logoEn.localScale = NOT_VISIBLE_SCALE logoCn.localScale = NOT_VISIBLE_SCALE + logoKO.localScale = NOT_VISIBLE_SCALE + logoJA.localScale = NOT_VISIBLE_SCALE elseif self.language == "cn" then logoCn.localScale = VISIBLE_SCALE logoEn.localScale = NOT_VISIBLE_SCALE logoZH.localScale = NOT_VISIBLE_SCALE + logoKO.localScale = NOT_VISIBLE_SCALE + logoJA.localScale = NOT_VISIBLE_SCALE + elseif self.language == "ko" then + logoKO.localScale = VISIBLE_SCALE + logoEn.localScale = NOT_VISIBLE_SCALE + logoCn.localScale = NOT_VISIBLE_SCALE + logoZH.localScale = NOT_VISIBLE_SCALE + logoJA.localScale = NOT_VISIBLE_SCALE + elseif self.language == "ja" then + logoJA.localScale = VISIBLE_SCALE + logoEn.localScale = NOT_VISIBLE_SCALE + logoCn.localScale = NOT_VISIBLE_SCALE + logoZH.localScale = NOT_VISIBLE_SCALE + logoKO.localScale = NOT_VISIBLE_SCALE else logoEn.localScale = VISIBLE_SCALE logoZH.localScale = NOT_VISIBLE_SCALE logoCn.localScale = NOT_VISIBLE_SCALE + logoKO.localScale = NOT_VISIBLE_SCALE + logoJA.localScale = NOT_VISIBLE_SCALE end self.dialogTrans = self.firstUI.transform:Find("message_box") diff --git a/lua/app/ui/battle/battle_result_ui.lua b/lua/app/ui/battle/battle_result_ui.lua index 30c48c93..4c3e85b5 100644 --- a/lua/app/ui/battle/battle_result_ui.lua +++ b/lua/app/ui/battle/battle_result_ui.lua @@ -90,7 +90,6 @@ function BattleResultUI:refreshFixedInfo() local desc3 = uiMap["battle_result_ui.unit_node.desc_3"] local rewardTitle = uiMap["battle_result_ui.reward_node.reward_title"] local continue = uiMap["battle_result_ui.continue"] - desc1:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_4)) desc2:setText(self.combatReport.wave) desc3:setText(I18N:getGlobalText(I18N.GlobalConst.BATTLE_DESC_7, GFunc.num2Str(self.totalDmg))) rewardTitle:setText(I18N:getGlobalText(I18N.GlobalConst.REWARD_DESC)) @@ -102,6 +101,8 @@ function BattleResultUI:refreshFixedInfo() local round = self.combatReport.remainRound or 0 desc2:setText(round) desc1:setText(I18N:getGlobalText(I18N.GlobalConst.ROUND_LEFT)) + else + desc1:setText(GConst.EMPTY_STRING) end icon:setSprite(GConst.ATLAS_PATH.COMMON, iconName) From 13edfce3142296bcf53af114d0e951e86b350933 Mon Sep 17 00:00:00 2001 From: chenxi Date: Fri, 16 Jun 2023 17:32:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/common/i18n_manager.lua | 18 ++++++++---------- lua/app/ui/hero/hero_detail_ui.lua | 12 +++++++++++- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lua/app/common/i18n_manager.lua b/lua/app/common/i18n_manager.lua index 8e80b962..054ee5ba 100644 --- a/lua/app/common/i18n_manager.lua +++ b/lua/app/common/i18n_manager.lua @@ -30,19 +30,19 @@ local SUPPORT_LANGUAGE_LIST = { GConst.LANGUAGE.ENGLISH, GConst.LANGUAGE.CHINESE, GConst.LANGUAGE.CHINESE_TC, - -- -- GConst.LANGUAGE.RUSSIAN, -- 俄罗斯 - -- -- GConst.LANGUAGE.THAILAND, -- 泰国 + -- GConst.LANGUAGE.RUSSIAN, -- 俄罗斯 + -- GConst.LANGUAGE.THAILAND, -- 泰国 -- GConst.LANGUAGE.INDONESIA, -- 印度尼西亚 -- GConst.LANGUAGE.VIETNAMESE, -- 越南 -- GConst.LANGUAGE.FRENCH, -- 法语 - -- -- GConst.LANGUAGE.ITALIAN, -- 意大利 + -- GConst.LANGUAGE.ITALIAN, -- 意大利 -- GConst.LANGUAGE.GERMAN, -- 德国 - -- -- GConst.LANGUAGE.SPANISH, -- 西班牙 + -- GConst.LANGUAGE.SPANISH, -- 西班牙 -- GConst.LANGUAGE.PORTUGUESE, -- 葡萄牙 - -- -- GConst.LANGUAGE.TURKISH, -- 土耳其 - -- -- GConst.LANGUAGE.MALAYSIA, -- 马来西亚 - -- GConst.LANGUAGE.JAPANESE, -- 日本 - -- GConst.LANGUAGE.KOREAN, -- 韩国 + -- GConst.LANGUAGE.TURKISH, -- 土耳其 + -- GConst.LANGUAGE.MALAYSIA, -- 马来西亚 + GConst.LANGUAGE.JAPANESE, -- 日本 + GConst.LANGUAGE.KOREAN, -- 韩国 } local SUPPORT_SERVER_LANGUAGE = { @@ -101,7 +101,6 @@ local LANGUAGE_NOMARL_SPRITE = { [GConst.LANGUAGE.ENGLISH] = "setting_language_en1", [GConst.LANGUAGE.CHINESE] = "setting_language_cn1", [GConst.LANGUAGE.CHINESE_TC] = "setting_language_tw1", - [GConst.LANGUAGE.FRENCH] = "setting_language_fr1", [GConst.LANGUAGE.ITALIAN] = "setting_language_it1", [GConst.LANGUAGE.GERMAN] = "setting_language_de1", @@ -119,7 +118,6 @@ local LANGUAGE_HIGHLIGHT_SPRITE = { [GConst.LANGUAGE.ENGLISH] = "setting_language_en2", [GConst.LANGUAGE.CHINESE] = "setting_language_cn2", [GConst.LANGUAGE.CHINESE_TC] = "setting_language_tw2", - [GConst.LANGUAGE.FRENCH] = "setting_language_fr2", [GConst.LANGUAGE.ITALIAN] = "setting_language_it2", [GConst.LANGUAGE.GERMAN] = "setting_language_de2", diff --git a/lua/app/ui/hero/hero_detail_ui.lua b/lua/app/ui/hero/hero_detail_ui.lua index 6b269856..700e6bd9 100644 --- a/lua/app/ui/hero/hero_detail_ui.lua +++ b/lua/app/ui/hero/hero_detail_ui.lua @@ -36,7 +36,17 @@ function HeroDetailUI:_display(lvChange) local uiMap = self.root:genAllChildren() uiMap["hero_detail_ui.bg.title_desc"]:setText(self.heroEntity:getName()) uiMap["hero_detail_ui.bg.lv_desc"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_1, self.heroEntity:getLv())) - uiMap["hero_detail_ui.bg.element_desc"]:setText(ModuleManager.HeroManager:getMatchTypeName(self.heroEntity:getMatchType())) + + local elementBg = uiMap["hero_detail_ui.bg.element_bg"] + local elementTx = uiMap["hero_detail_ui.bg.element_desc"] + local elementTxRectWidth = elementTx:getRectWidth() + elementTx:setText(ModuleManager.HeroManager:getMatchTypeName(self.heroEntity:getMatchType())) + local elementTxWidth = elementTx:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_TEXT_MESH_PRO).preferredWidth + if elementTxWidth > elementTxRectWidth then + elementBg:setSizeDeltaX(52 + elementTxWidth) + else + elementBg:setSizeDeltaX(52 + elementTxRectWidth) + end uiMap["hero_detail_ui.bg.skill_desc"]:setText(ModuleManager.HeroManager:getSkillDesc(self.heroEntity:getBaseSkill())) uiMap["hero_detail_ui.bg.hp_name"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_2)) uiMap["hero_detail_ui.bg.atk_name"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_DESC_3))