This commit is contained in:
puxuan 2025-08-14 11:48:50 +08:00
parent 667d76fcde
commit 81943774f4
5 changed files with 29 additions and 19 deletions

View File

@ -640,7 +640,7 @@ local LocalizationGlobalConst =
ITEM_NOT_ENOUGH_DESC = "ITEM_NOT_ENOUGH_DESC", ITEM_NOT_ENOUGH_DESC = "ITEM_NOT_ENOUGH_DESC",
SUMMON_ONE = "SUMMON_ONE", SUMMON_ONE = "SUMMON_ONE",
SUMMON_TEN = "SUMMON_TEN", SUMMON_TEN = "SUMMON_TEN",
FREE_THIS_TIME_DESC = "FREE_THIS_TIME_DESC", FREE_THIS_TIME_DESC_1 = "FREE_THIS_TIME_DESC_1",
SUMMON_DESC_22 = "SUMMON_DESC_22", SUMMON_DESC_22 = "SUMMON_DESC_22",
SUMMON_WISH_OK = "SUMMON_WISH_OK", SUMMON_WISH_OK = "SUMMON_WISH_OK",
SUMMON_WISH_TITLE = "SUMMON_WISH_TITLE", SUMMON_WISH_TITLE = "SUMMON_WISH_TITLE",
@ -650,6 +650,9 @@ local LocalizationGlobalConst =
BATTLE_FORCE_CHOOSE_DESC_2 = "BATTLE_FORCE_CHOOSE_DESC_2", BATTLE_FORCE_CHOOSE_DESC_2 = "BATTLE_FORCE_CHOOSE_DESC_2",
SUMMON_WISH_LOCK = "SUMMON_WISH_LOCK", SUMMON_WISH_LOCK = "SUMMON_WISH_LOCK",
SUMMON_FORCE_3 = "SUMMON_FORCE_3", SUMMON_FORCE_3 = "SUMMON_FORCE_3",
CHAPTER_WAVE_REAWRD_1 = "CHAPTER_WAVE_REAWRD_1",
CHAPTER_WAVE_REAWRD_2 = "CHAPTER_WAVE_REAWRD_2",
CHAPTER_WAVE_REAWRD_3 = "CHAPTER_WAVE_REAWRD_3",
} }
return LocalizationGlobalConst return LocalizationGlobalConst

View File

@ -640,7 +640,7 @@ local localization_global =
["ITEM_NOT_ENOUGH_DESC"] = "是否使用<color=#c40e0e>钻石*{0}</color>补充<color=#c45f0e>魔法石*{1}</color>,进行召唤?", ["ITEM_NOT_ENOUGH_DESC"] = "是否使用<color=#c40e0e>钻石*{0}</color>补充<color=#c45f0e>魔法石*{1}</color>,进行召唤?",
["SUMMON_ONE"] = "召唤1次", ["SUMMON_ONE"] = "召唤1次",
["SUMMON_TEN"] = "召唤10次", ["SUMMON_TEN"] = "召唤10次",
["FREE_THIS_TIME_DESC"] = "本次免费", ["FREE_THIS_TIME_DESC_1"] = "本次免费",
["SUMMON_DESC_22"] = "点击广告召唤", ["SUMMON_DESC_22"] = "点击广告召唤",
["SUMMON_WISH_OK"] = "确定选择", ["SUMMON_WISH_OK"] = "确定选择",
["SUMMON_WISH_TITLE"] = "心愿英雄", ["SUMMON_WISH_TITLE"] = "心愿英雄",
@ -650,6 +650,9 @@ local localization_global =
["BATTLE_FORCE_CHOOSE_DESC_2"] = "请选择想要的奖励", ["BATTLE_FORCE_CHOOSE_DESC_2"] = "请选择想要的奖励",
["SUMMON_WISH_LOCK"] = "未解锁心愿", ["SUMMON_WISH_LOCK"] = "未解锁心愿",
["SUMMON_FORCE_3"] = "概率", ["SUMMON_FORCE_3"] = "概率",
["CHAPTER_WAVE_REAWRD_1"] = "未达成",
["CHAPTER_WAVE_REAWRD_2"] = "通关奖励",
["CHAPTER_WAVE_REAWRD_3"] = "本关奖励已领取",
} }
return localization_global return localization_global

View File

@ -29,7 +29,7 @@ MainCityConst.LEFT_SIDE_BARS = {
-- "app/ui/main_city/cell/side_bar_tourn_wave_cell", -- "app/ui/main_city/cell/side_bar_tourn_wave_cell",
-- "app/ui/main_city/cell/side_bar_tourn_arena_cell", -- "app/ui/main_city/cell/side_bar_tourn_arena_cell",
-- gm放最后一个 -- gm放最后一个
"app/ui/main_city/cell/side_bar_gm_cell" -- "app/ui/main_city/cell/side_bar_gm_cell"
} }
MainCityConst.RIGHT_SIDE_BARS = { MainCityConst.RIGHT_SIDE_BARS = {

View File

@ -10,10 +10,6 @@ end
function ChapterBoxUI:ctor(params) function ChapterBoxUI:ctor(params)
self.chapterId = params.chapterId self.chapterId = params.chapterId
-- local chapterId = DataManager.ChapterData:getChapterId()
-- local chapterMaxId = DataManager.ChapterData:getMaxChapterId()
-- local idx = DataManager.ChapterData:getChapterIdIdx(chapterId)
end end
function ChapterBoxUI:onLoadRootComplete() function ChapterBoxUI:onLoadRootComplete()
@ -23,25 +19,33 @@ function ChapterBoxUI:onLoadRootComplete()
self:closeUI() self:closeUI()
end) end)
self.selImg = uiMap["chapter_box_ui.bg.sel_img"] self.selImg = uiMap["chapter_box_ui.bg.bg1.sel_img"]
self.maxWaveTx = uiMap["chapter_box_ui.bg.max_wave_tx"] self.maxWaveTx = uiMap["chapter_box_ui.bg.max_wave_tx"]
-- uiMap["chapter_box_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.HERO_TRIAL_DESC_1)) uiMap["chapter_box_ui.bg.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CHAPTER_WAVE_REAWRD_2))
uiMap["chapter_box_ui.bg.title_tx"]:setText("通关奖励")
self.page = DataManager.ChapterData:getChapterIdPage(self.chapterId) self.chapterPage = DataManager.ChapterData:getChapterPage(self.chapterId)
self.pageIdx = DataManager.ChapterData:getChapterIdIdx(self.chapterId) self.chapterStage = DataManager.ChapterData:getChapterStage(self.chapterId)
local chapterList = DataManager.ChapterData:getChapterList(self.chapterPage)
self.chapterTxs = {} self.chapterTxs = {}
for i = 1, 5 do for i = 1, 5 do
self.chapterTxs[i] = uiMap["chapter_box_ui.bg.chapter_tx_" .. i] self.chapterTxs[i] = uiMap["chapter_box_ui.bg.bg1.tx_node.chapter_tx_" .. i]
if i <= #chapterList then
self.chapterTxs[i]:setActive(true)
else
self.chapterTxs[i]:setActive(false)
end
self.chapterTxs[i]:addClickListener(function() self.chapterTxs[i]:addClickListener(function()
if self.pageIdx == i then if self.chapterStage == i then
return return
end end
self.pageIdx = i self.chapterStage = i
self:onRefresh() self:onRefresh()
end) end)
end end
uiMap["chapter_box_ui.bg.bg1"]:setSizeDeltaX(#chapterList * 118)
uiMap["chapter_box_ui.bg.bg1.tx_node"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_HORIZONTAL_OR_VERTICAL_LAYOUT):RefreshLayout()
self.scrollRect = uiMap["chapter_box_ui.bg.scrollrect"] self.scrollRect = uiMap["chapter_box_ui.bg.scrollrect"]
self.scrollRectComp = self.scrollRect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE) self.scrollRectComp = self.scrollRect:addLuaComponent(GConst.TYPEOF_LUA_CLASS.SCROLL_RECT_BASE)
self.scrollRectComp:addInitCallback(function() self.scrollRectComp:addInitCallback(function()
@ -58,11 +62,11 @@ function ChapterBoxUI:onLoadRootComplete()
end end
function ChapterBoxUI:onRefresh() function ChapterBoxUI:onRefresh()
self.chapterId = DataManager.ChapterData:getChapterIdByPageAndIdx(self.page, self.pageIdx) self.chapterId = DataManager.ChapterData:getChapterCfgByPageAndStage(self.chapterPage, self.chapterStage)
for i = 1, 5 do for i = 1, 5 do
self.chapterTxs[i]:setText(self.page .. "-" .. i) self.chapterTxs[i]:setText(self.chapterPage .. "-" .. i)
end end
self.selImg:setAnchoredPositionX((self.pageIdx - 3) * 118) self.selImg:setAnchoredPositionX((self.chapterStage - 0.5) * 118)
local list = DataManager.ChapterData:getChapterBoxRewardList(self.chapterId) local list = DataManager.ChapterData:getChapterBoxRewardList(self.chapterId)
self.scrollRectComp:refillCells(#list) self.scrollRectComp:refillCells(#list)

View File

@ -111,7 +111,7 @@ function SummonMainUI:onLoadRootComplete()
self.summonBg = uiMap['summon_main_ui.bg'] self.summonBg = uiMap['summon_main_ui.bg']
uiMap["summon_main_ui.node.btn_summon_one.text_one"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_ONE)) uiMap["summon_main_ui.node.btn_summon_one.text_one"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_ONE))
uiMap["summon_main_ui.node.btn_summon_ten.text_ten"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_TEN)) uiMap["summon_main_ui.node.btn_summon_ten.text_ten"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_TEN))
uiMap["summon_main_ui.node.btn_summon_free.text_free"]:setText(I18N:getGlobalText(I18N.GlobalConst.FREE_THIS_TIME_DESC)) uiMap["summon_main_ui.node.btn_summon_free.text_free"]:setText(I18N:getGlobalText(I18N.GlobalConst.FREE_THIS_TIME_DESC_1))
uiMap["summon_main_ui.node.btn_summon_ad.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_22)) uiMap["summon_main_ui.node.btn_summon_ad.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_DESC_22))
uiMap["summon_main_ui.node.btn_info.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_FORCE_3)) uiMap["summon_main_ui.node.btn_info.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.SUMMON_FORCE_3))
self.descBg = uiMap["summon_main_ui.node.desc_bg"] self.descBg = uiMap["summon_main_ui.node.desc_bg"]