From 12ee9c73b4d117a901c29dce4a29800874ad37cf Mon Sep 17 00:00:00 2001 From: puxuan <413323644@qq.com> Date: Thu, 4 Sep 2025 18:20:02 +0800 Subject: [PATCH] =?UTF-8?q?boss=E6=8A=80=E8=83=BD=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/app/module/tips/tips_manager.lua | 11 +++++------ lua/app/ui/tips/battle_skill_tips.lua | 9 +++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lua/app/module/tips/tips_manager.lua b/lua/app/module/tips/tips_manager.lua index a722163a..4a9edc8d 100644 --- a/lua/app/module/tips/tips_manager.lua +++ b/lua/app/module/tips/tips_manager.lua @@ -174,12 +174,11 @@ function TipsManager:showSkillTips(targetObj, buffIds, skillId) end function TipsManager:showBattleSkillTips(targetObj, buffIds, skillId) - local tarCornerScreenPos = self:getCornerScreenPosition(targetObj, TipsManager.ALIGN_TYPE.TOP_CENTER) - local params = { - tarCornerScreenPos = tarCornerScreenPos, - buffNames = buffIds, - skillId = skillId, - } + local params = {} + local tarCornerScreenPos = self:getCornerScreenPosition(targetObj, TipsManager.ALIGN_TYPE.LEFT_CENTER) + params.tarCornerScreenPos = tarCornerScreenPos + params.buffNames = buffIds + params.skillId = skillId UIManager:showUI("app/ui/tips/battle_skill_tips", params) end diff --git a/lua/app/ui/tips/battle_skill_tips.lua b/lua/app/ui/tips/battle_skill_tips.lua index 200ec5cf..fe7c0d3c 100644 --- a/lua/app/ui/tips/battle_skill_tips.lua +++ b/lua/app/ui/tips/battle_skill_tips.lua @@ -19,7 +19,7 @@ function SkillTips:ctor(params) self.tarCornerScreenPos = params.tarCornerScreenPos self.buffNames = params.buffNames self.skillId = params.skillId - self.location = self.skillId ~= nil and ModuleManager.TipsManager.ALIGN_TYPE.TOP_CENTER or ModuleManager.TipsManager.ALIGN_TYPE.BOTTOM_CENTER + self.location = ModuleManager.TipsManager.ALIGN_TYPE.LEFT_CENTER end function SkillTips:getPrefabPath() @@ -31,8 +31,8 @@ function SkillTips:onLoadRootComplete() self.content = uiMap["skill_tips.content"] self.bg = uiMap["skill_tips.content.bg"] - self.imgArrow = uiMap["skill_tips.content.bg.img_arrow"] self.txDesc = uiMap["skill_tips.content.bg.tx_desc"] + self.imgArrowRight = uiMap["skill_tips.content.bg.img_arrow_right"] self.skillList = {} for i = 1, 3 do table.insert(self.skillList, uiMap["skill_tips.content.bg.item_desc_" .. i]) @@ -57,7 +57,8 @@ function SkillTips:onRefresh() self:refreshSkillDesc() if self.tarCornerScreenPos then - self:locate(self.location, self.originSizeDelta, self.bg, self.tarCornerScreenPos) + local pos = {x = self.tarCornerScreenPos.x - 17, y = self.tarCornerScreenPos.y} + self:locate(self.location, self.originSizeDelta, self.bg, pos) end end @@ -79,7 +80,7 @@ function SkillTips:refreshSkillDesc() local iconSize = self.skillId ~= nil and ICON_SIZE_SKILL or ICON_SIZE_BUFF local buffWidth = self.skillId ~= nil and BUFF_TX_WIDTH_SKILL or BUFF_TX_WIDTH_BUFF self.bg:setSizeDeltaX(width) - self.imgArrow:setActive(self.skillId ~= nil) + self.imgArrowRight:setActive(self.skillId ~= nil) -- Logger.logHighlight("显示buff:") -- Logger.printTable(self.buffNames)