diff --git a/lua/app/global/global_const.lua b/lua/app/global/global_const.lua index d69e916a..f3af667a 100644 --- a/lua/app/global/global_const.lua +++ b/lua/app/global/global_const.lua @@ -233,7 +233,7 @@ GConst.ATLAS_PATH = { ICON_TALENT = "assets/arts/atlas/icon/talent.asset", BOUNTY = "assets/arts/atlas/ui/bounty.asset", UI_SETTING = "assets/arts/atlas/ui/setting.asset", - SHOP = "assets/arts/atlas/ui/shop.asset", + UI_SHOP = "assets/arts/atlas/ui/shop.asset", HERO = "assets/arts/atlas/ui/hero.asset", UI_FUND = "assets/arts/atlas/ui/fund.asset", SEVEN_DAY = "assets/arts/atlas/ui/sevenday.asset", diff --git a/lua/app/ui/activity/common/comp/act_page_btns_comp.lua b/lua/app/ui/activity/common/comp/act_page_btns_comp.lua index eb6a3d1f..254534da 100755 --- a/lua/app/ui/activity/common/comp/act_page_btns_comp.lua +++ b/lua/app/ui/activity/common/comp/act_page_btns_comp.lua @@ -5,6 +5,7 @@ local PAGE_BTN_CELL = "app/ui/activity/common/cell/act_page_btn_cell" function PageBtnsComp:init() local uiMap = self:getUIMap() self.scrollrect = uiMap["act_page_btns_comp.scrollrect"] + self.content = uiMap["act_page_btns_comp.scrollrect.viewport.content"] end function PageBtnsComp:setRedPointPos(posX, posY, scale) @@ -36,7 +37,9 @@ function PageBtnsComp:refresh(list, index) if index then self.scrollRect:moveToIndex(index) end + local maxSizeX = math.min(#self.list * 124, 540) self.baseObject:setSizeDeltaX(#self.list * 124) + self.content:setSizeDeltaX(#self.list * 124) end return PageBtnsComp \ No newline at end of file diff --git a/lua/app/ui/battle/battle_result_ui.lua b/lua/app/ui/battle/battle_result_ui.lua index b31a773f..c22a6009 100644 --- a/lua/app/ui/battle/battle_result_ui.lua +++ b/lua/app/ui/battle/battle_result_ui.lua @@ -321,12 +321,12 @@ function BattleResultUI:refreshArenaBoxNode() if self.isWin then -- 胜利宝箱 self.arenaBoxNode:setSprite(GConst.ATLAS_PATH.ARENA, "arena_bg_6") - self.arenaBoxImgIcon:setSprite(GConst.ATLAS_PATH.SHOP, "shop_chest_5") + self.arenaBoxImgIcon:setSprite(GConst.ATLAS_PATH.UI_SHOP, "shop_chest_5") self.arenaBoxTxTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_33)) else -- 鼓励宝箱 self.arenaBoxNode:setSprite(GConst.ATLAS_PATH.ARENA, "arena_bg_5") - self.arenaBoxImgIcon:setSprite(GConst.ATLAS_PATH.SHOP, "shop_chest_4") + self.arenaBoxImgIcon:setSprite(GConst.ATLAS_PATH.UI_SHOP, "shop_chest_4") self.arenaBoxTxTitle:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_34)) end ModuleManager.ArenaManager:markAdBox(self.isWin) diff --git a/lua/app/ui/battle/battle_revive_ui.lua b/lua/app/ui/battle/battle_revive_ui.lua index 0dc42c57..b9f6eb89 100644 --- a/lua/app/ui/battle/battle_revive_ui.lua +++ b/lua/app/ui/battle/battle_revive_ui.lua @@ -21,8 +21,7 @@ end function BattleReviveUI:_display() local uiMap = self.root:genAllChildren() - self.title1Tx = uiMap["battle_revive_ui.bg.tx_1"] - -- self.title2Tx = uiMap["battle_revive_ui.bg.tx_2"] + self.title1Tx = uiMap["battle_revive_ui.bg.title_text"] self.descTx = uiMap["battle_revive_ui.bg.tx_desc"] self.costBtn = uiMap["battle_revive_ui.bg.cost_btn"] @@ -30,7 +29,8 @@ function BattleReviveUI:_display() self.adBtn = uiMap["battle_revive_ui.bg.ad_btn"] self.adIcon = uiMap["battle_revive_ui.bg.ad_btn.icon"] self.adTx = uiMap["battle_revive_ui.bg.ad_btn.tx"] - self.adLimitTx = uiMap["battle_revive_ui.limit_tx"] + self.adLimitTx = uiMap["battle_revive_ui.bg.limit_tx"] + self.closeBtn = uiMap["battle_revive_ui.bg.close_btn"] self.cancelBtn = uiMap["battle_revive_ui.bg.cancel_btn"] self.cancelTx = uiMap["battle_revive_ui.bg.cancel_btn.tx"] @@ -86,17 +86,17 @@ function BattleReviveUI:_display() local noAdBuyBtn = uiMap["battle_revive_ui.no_ad_node.btn_buy"] local noAdBuyTx = uiMap["battle_revive_ui.no_ad_node.btn_buy.tx_desc"] - -- if DataManager.PlayerData:getNoAdFuncOpen() and not DataManager.PlayerData:getNoAdActive() then - -- noAdNode:setActive(true) - -- noAdTitleTx:setText(I18N:getGlobalText(I18N.GlobalConst.ADS_DESC_15)) - -- noAdDescTx:setText(I18N:getGlobalText(I18N.GlobalConst.ADS_DESC_16)) - -- noAdBuyBtn:addClickListener(function() - -- ModuleManager.PrivilegeCardManager:buyAdCard() - -- end) - -- noAdBuyTx:setText(DataManager.PlayerData:getNoAdPrice()) - -- else - -- noAdNode:setActive(false) - -- end + if DataManager.PrivilegeCardData:getIsAdCardOpen() and not DataManager.PrivilegeCardData:getIsCardActive(GConst.ShopConst.PRIVILEGE_CARD_ID.CARD_AD) then + noAdNode:setActive(true) + noAdTitleTx:setText(I18N:getGlobalText(I18N.GlobalConst.ADS_DESC_15)) + noAdDescTx:setText(I18N:getGlobalText(I18N.GlobalConst.ADS_DESC_16)) + noAdBuyBtn:addClickListener(function() + ModuleManager.PrivilegeCardManager:buyAdCard() + end) + noAdBuyTx:setText(DataManager.PlayerData:getNoAdPrice()) + else + noAdNode:setActive(false) + end end function BattleReviveUI:_addListeners() @@ -117,12 +117,14 @@ function BattleReviveUI:_addListeners() self.adBtn:addClickListener(function() SDKManager:showFullScreenAds(BIReport.ADS_CLICK_TYPE.BATTLE_REVIVE, function() self:doRevive(true) - end) + end, true) end) self.cancelBtn:addClickListener(function() self:cancelRevive() end) - + self.closeBtn:addClickListener(function() + self:cancelRevive() + end) self:addEventListener(EventManager.CUSTOM_EVENT.BATTLE_REVIVE, function() self:onRevive() end) @@ -139,10 +141,6 @@ function BattleReviveUI:doRevive(isAd) end function BattleReviveUI:onRevive() - -- self.fx:setActive(true) - -- self.fx:play() - -- self.spineObj:playAnimComplete("open", false, true, function() - -- self:closeUI() self:closeUI() if self.callback then self.callback(true) diff --git a/lua/app/ui/game_setting/select_other_btn_ui.lua b/lua/app/ui/game_setting/select_other_btn_ui.lua index 7710ad33..f8f8f68a 100644 --- a/lua/app/ui/game_setting/select_other_btn_ui.lua +++ b/lua/app/ui/game_setting/select_other_btn_ui.lua @@ -1,6 +1,6 @@ local SelectOtherBtnUI = class("SelectOtherBtnUI", BaseUI) -local BTN_OFFSET = -10 +local BTN_OFFSET = -14 local BTN_INTERVAL = 56 function SelectOtherBtnUI:ctor() @@ -95,7 +95,7 @@ function SelectOtherBtnUI:onLoadRootComplete() self:closeUI() ModuleManager.DevToolManager:showOrHideDevListUI() end) - self.uiMap["select_other_btn_ui.bg.gm_btn.text"]:setText(I18N:getGlobalText(I18N.GlobalConst.SETTING_DESC)) + self.uiMap["select_other_btn_ui.bg.gm_btn.text"]:setText("GM") else self.uiMap["select_other_btn_ui.bg.gm_btn"]:setVisible(false) end diff --git a/lua/app/ui/idle/idle_drop_ui.lua b/lua/app/ui/idle/idle_drop_ui.lua index 93294305..d8aedb54 100644 --- a/lua/app/ui/idle/idle_drop_ui.lua +++ b/lua/app/ui/idle/idle_drop_ui.lua @@ -48,6 +48,7 @@ function IdleDropUI:onLoadRootComplete() self.uiMap = uiMap uiMap["idle_drop_ui.bg.title_text"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DROP_REWARD)) self.timeTx = uiMap["idle_drop_ui.bg.time_tx"] + self.bg = uiMap["idle_drop_ui.bg"] local goldPerHour = GFunc.num2Str(DataManager.IdleData:getGoldPerHour()) local expPerHour = GFunc.num2Str(DataManager.IdleData:getExpPerHour()) @@ -88,7 +89,7 @@ function IdleDropUI:onLoadRootComplete() ModuleManager.PrivilegeCardManager:showPrivilegeUI() end) - uiMap["idle_drop_ui.bg.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_CLOSE_DESC)) + uiMap["idle_drop_ui.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CLICK_CLOSE_DESC)) uiMap["idle_drop_ui.bg.bg1.desc_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DESC_8)) uiMap["idle_drop_ui.bg.bg1.desc_tx_1"]:setText(I18N:getGlobalText(I18N.GlobalConst.IDLE_DESC_9)) @@ -207,11 +208,15 @@ function IdleDropUI:bindData() self.canRefreshReward = true self:refreshCD() end) + self:bind(DataManager.PrivilegeCardData, "isDirty", function() + self:onRefresh() + end) end function IdleDropUI:onRefresh() self:refreshRewards() self:refreshBtns() + self:refreshAd() GFunc.setAdsSprite(self.adBtnImg) end @@ -421,4 +426,14 @@ function IdleDropUI:tickFight(dt) end end +function IdleDropUI:refreshAd() + if DataManager.PrivilegeCardData:getIsMonthlyCardOpen() and not DataManager.PrivilegeCardData:getIsCardActive(GConst.ShopConst.PRIVILEGE_CARD_ID.MONTHLY_CARD) then + self.privilegeBtn:setActive(true) + self.bg:setAnchoredPositionY(-55) + else + self.privilegeBtn:setActive(false) + self.bg:setAnchoredPositionY(-120) + end +end + return IdleDropUI \ No newline at end of file diff --git a/lua/app/ui/main_city/component/main_comp.lua b/lua/app/ui/main_city/component/main_comp.lua index fb04d098..17b3a1c3 100644 --- a/lua/app/ui/main_city/component/main_comp.lua +++ b/lua/app/ui/main_city/component/main_comp.lua @@ -280,7 +280,7 @@ function MainComp:refreshRedPoint() end if DataManager.ChapterData:getChapterBoxCanGet() then - self.chapterBoxBtn:addRedPoint(20, 20, 1) + self.chapterBoxBtn:addRedPoint(24, 24, 1) else self.chapterBoxBtn:removeRedPoint() end diff --git a/lua/app/ui/shop/box_hero_ui.lua b/lua/app/ui/shop/box_hero_ui.lua index 00dcd4c3..ce5ed2b3 100755 --- a/lua/app/ui/shop/box_hero_ui.lua +++ b/lua/app/ui/shop/box_hero_ui.lua @@ -97,7 +97,7 @@ function BoxHeroUI:refreshCummonBox() end) self.titleTx:setText(TITLE_TEXT[self.summonType]) - self.boxImg:setSprite(GConst.ATLAS_PATH.SHOP, ICON_NAME[self.summonType]) + self.boxImg:setSprite(GConst.ATLAS_PATH.UI_SHOP, ICON_NAME[self.summonType]) self:showRewards(DataManager.SummonData:getSummonTotalRewardByLv(self.summonType))-- 本次实际奖励