Fix damage pop UI paths and card hover tooltip support
This commit is contained in:
@@ -173,7 +173,7 @@ local uiPos = _UILogic:ScreenToUIPosition(touchPoint)
|
||||
local bestPath = nil
|
||||
local bestDist = 999999
|
||||
for i = 1, maxSlots do
|
||||
local path = prefix .. tostring(i)
|
||||
local path = prefix .. self:IntStr(i)
|
||||
local cardEntity = _EntityService:GetEntityByPath(path)
|
||||
if cardEntity ~= nil and cardEntity.Enable == true and cardEntity.UITransformComponent ~= nil then
|
||||
local pos = self:GetUiPathPosition(path)
|
||||
@@ -255,6 +255,9 @@ end
|
||||
if self.DragSlot ~= nil and self.DragSlot > 0 and string.find(path, "/ui/RunUIGroup/CardHand/Card", 1, true) == 1 then
|
||||
return
|
||||
end
|
||||
if self.GridScrollActive == true and (string.find(path, "/ui/DeckUIGroup/DeckAllHud/Grid/Card", 1, true) == 1 or string.find(path, "/ui/DeckUIGroup/DeckInspectHud/Grid/Card", 1, true) == 1) then
|
||||
return
|
||||
end
|
||||
local cardId = self:GetHoveredCardId(path)
|
||||
if cardId == nil or self.Cards == nil then
|
||||
self:HideTooltip()
|
||||
@@ -320,7 +323,7 @@ local cardId = self.Hand[slot]
|
||||
if cardId == nil then
|
||||
return
|
||||
end
|
||||
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||
local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. self:IntStr(slot))
|
||||
if e ~= nil and e.UITransformComponent ~= nil then
|
||||
e.UITransformComponent.UIScale = Vector3(1.3, 1.3, 1)
|
||||
end
|
||||
@@ -328,13 +331,13 @@ local c = self.Cards[cardId]
|
||||
if c ~= nil then
|
||||
local tip = self:BuildCardKeywordTooltip(c)
|
||||
if tip ~= "" then
|
||||
local anchor = self:GetTooltipAnchorForPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||
local anchor = self:GetTooltipAnchorForPath("/ui/RunUIGroup/CardHand/Card" .. self:IntStr(slot))
|
||||
self:ShowTooltipAt("키워드", tip, anchor.x, anchor.y)
|
||||
else
|
||||
self:HideTooltip()
|
||||
end
|
||||
end`, [{ Type: 'number', DefaultValue: null, SyncDirection: 0, Attributes: [], Name: 'slot' }]),
|
||||
method('UnhoverCard', `local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. tostring(slot))
|
||||
method('UnhoverCard', `local e = _EntityService:GetEntityByPath("/ui/RunUIGroup/CardHand/Card" .. self:IntStr(slot))
|
||||
if e ~= nil and e.UITransformComponent ~= nil then
|
||||
e.UITransformComponent.UIScale = Vector3(1, 1, 1)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user