diff --git a/lua/app/ui/common/mop_up_ui.lua b/lua/app/ui/common/mop_up_ui.lua index 110e5bcb..eeb02ab9 100644 --- a/lua/app/ui/common/mop_up_ui.lua +++ b/lua/app/ui/common/mop_up_ui.lua @@ -88,14 +88,16 @@ function MopUpUI:refreshTarget() self.rewardCell:refreshItemById(self.target.id) self.rewardCell:hideCountTx() - uiMap["mop_up_ui.bg.item_node.desc_1"]:setText(GFunc.getRewardName(GConst.REWARD_TYPE.ITEM, self.target.id)) local curProgress = DataManager.BagData.ItemData:getItemNumById(self.target.id) or 0 + local itemNameTx = GFunc.getRewardName(GConst.REWARD_TYPE.ITEM, self.target.id) local progressTx if curProgress >= self.target.value then progressTx = string.format("%s/%s", curProgress, self.target.value) else + itemNameTx = itemName .. "(" .. I18N:getGlobalText(I18N.GlobalConst.MOP_UP_DESC_3) .. ")" progressTx = string.format("%s/%s", curProgress, self.target.value) end + uiMap["mop_up_ui.bg.item_node.desc_1"]:setText(itemNameTx) uiMap["mop_up_ui.bg.item_node.desc_2"]:setText(progressTx) uiMap["mop_up_ui.bg.item_node.progress_slider"]:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_SLIDER).value = curProgress / self.target.value end diff --git a/lua/app/ui/hero/armor_info_comp.lua b/lua/app/ui/hero/armor_info_comp.lua index 5b80beba..4c5f6bce 100644 --- a/lua/app/ui/hero/armor_info_comp.lua +++ b/lua/app/ui/hero/armor_info_comp.lua @@ -152,15 +152,9 @@ function ArmorInfoComp:refreshSelectArmor() icon:setSprite(atlas, name, function () icon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize() end) - if costNum - haveNum > 0 then - add:setActive(true) - icon:setTouchEnable(true) - else - add:setActive(false) - icon:setTouchEnable(false) - end + add:setActive(costNum - haveNum > 0) icon:addClickListener(function() - UIManager:showUI("app/ui/dungeon/item_get_ui", {id = costId, value = costNum - haveNum}) + UIManager:showUI("app/ui/dungeon/item_get_ui", {id = costId, value = costNum - haveNum < 0 and 0 or costNum - haveNum}) end) else costNode:setActive(false) diff --git a/lua/app/ui/hero/weapon_info_comp.lua b/lua/app/ui/hero/weapon_info_comp.lua index 2d200319..30f105c8 100644 --- a/lua/app/ui/hero/weapon_info_comp.lua +++ b/lua/app/ui/hero/weapon_info_comp.lua @@ -111,15 +111,9 @@ function WeaponInfoComp:refresh() icon:setSprite(atlas, name, function () icon:getComponent(GConst.TYPEOF_UNITY_CLASS.UI_IMAGE):SetNativeSize() end) - if costNum - haveNum > 0 then - add:setActive(true) - icon:setTouchEnable(true) - else - add:setActive(false) - icon:setTouchEnable(false) - end + add:setActive(costNum - haveNum > 0) icon:addClickListener(function() - UIManager:showUI("app/ui/dungeon/item_get_ui", {id = costId, value = costNum - haveNum}) + UIManager:showUI("app/ui/dungeon/item_get_ui", {id = costId, value = costNum - haveNum < 0 and 0 or costNum - haveNum}) end) else costNode:setActive(false) diff --git a/lua/app/ui/shop/shop_comp.lua b/lua/app/ui/shop/shop_comp.lua index 1c2b787e..e7b66a13 100644 --- a/lua/app/ui/shop/shop_comp.lua +++ b/lua/app/ui/shop/shop_comp.lua @@ -17,6 +17,8 @@ local PAGE_DISCOUNT_LEVEL_SELL_CELL = "app/ui/shop/cell/level_sell_cell" -- 助 local PAGE_DISCOUNT_GROW_SELL_CELL = "app/ui/shop/cell/grow_sell_cell" -- 成长 local PAGE_DISCOUNT_COIN_SELL_CELL = "app/ui/shop/cell/coin_sell_cell" -- 金币 local PAGE_DISCOUNT_ARENA_SELL_CELL = "app/ui/shop/cell/arena_gift_sell_cell" -- 竞技场 +local PAGE_DISCOUNT_WEAPON_SELL_CELL = "app/ui/shop/cell/weapon_gift_sell_cell" -- 武器 +local PAGE_DISCOUNT_ARMOR_SELL_CELL = "app/ui/shop/cell/armor_gift_sell_cell" -- 防具 function ShopComp:init() self.uiMap = self.baseObject:genAllChildren()