version: 1.4.0 fixes

This commit is contained in:
Salikh Gurgenidze
2025-12-23 22:40:51 +04:00
parent 54145890de
commit 8b24684537
3 changed files with 64 additions and 24 deletions
+21 -1
View File
@@ -372,9 +372,21 @@ function BagFrame:GetSectionHeader(index)
if not header then
header = CreateFrame("Frame", name, getglobal("Guda_BagFrame_ItemContainer"))
header:SetHeight(20)
header:EnableMouse(true)
local text = header:CreateFontString(nil, "OVERLAY", "GameFontNormal")
text:SetPoint("LEFT", header, "LEFT", 0, 0)
header.text = text
header:SetScript("OnEnter", function()
if this.fullName and this.isShortened then
GameTooltip:SetOwner(this, "ANCHOR_TOP")
GameTooltip:SetText(this.fullName)
GameTooltip:Show()
end
end)
header:SetScript("OnLeave", function()
GameTooltip:Hide()
end)
end
header.inUse = true
return header
@@ -556,7 +568,15 @@ function BagFrame:DisplayItemsByCategory(bagData, isOtherChar, charName)
headerIdx = headerIdx + 1
header:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", startX + currentX, startY - currentY)
header:SetWidth(blockWidth)
header.text:SetText(catName)
local displayName = catName
header.fullName = catName
header.isShortened = false
if string.len(displayName) > 10 and numItems < 2 then
displayName = string.sub(displayName, 1, 7) .. "..."
header.isShortened = true
end
header.text:SetText(displayName)
header:Show()
local itemY = currentY + 20
+21 -1
View File
@@ -224,9 +224,21 @@ function BankFrame:GetSectionHeader(index)
if not header then
header = CreateFrame("Frame", name, getglobal("Guda_BankFrame_ItemContainer"))
header:SetHeight(20)
header:EnableMouse(true)
local text = header:CreateFontString(nil, "OVERLAY", "GameFontNormal")
text:SetPoint("LEFT", header, "LEFT", 0, 0)
header.text = text
header:SetScript("OnEnter", function()
if this.fullName and this.isShortened then
GameTooltip:SetOwner(this, "ANCHOR_TOP")
GameTooltip:SetText(this.fullName)
GameTooltip:Show()
end
end)
header:SetScript("OnLeave", function()
GameTooltip:Hide()
end)
end
header.inUse = true
return header
@@ -408,7 +420,15 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
headerIdx = headerIdx + 1
header:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", startX + currentX, startY - currentY)
header:SetWidth(blockWidth)
header.text:SetText(catName)
local displayName = catName
header.fullName = catName
header.isShortened = false
if string.len(displayName) > 10 and numItems < 2 then
displayName = string.sub(displayName, 1, 7) .. "..."
header.isShortened = true
end
header.text:SetText(displayName)
header:Show()
local itemY = currentY + 20
+22 -22
View File
@@ -957,28 +957,28 @@ function Guda_ItemButton_OnEnter(self)
-- Debug: print hovered item's texture path to chat
-- Uses GetItemInfo on the hovered item's ID
if self.hasItem then
local link = nil
if self.itemData and self.itemData.link then
link = self.itemData.link
else
-- Fallback to live bag query
link = GetContainerItemLink(self.bagID, self.slotID)
end
if link and addon and addon.Modules and addon.Modules.Utils and addon.Modules.Utils.ExtractItemID then
local itemID = addon.Modules.Utils:ExtractItemID(link)
if itemID and addon.Modules.Utils.GetItemInfoSafe then
local name, itemLink, itemRarity, itemLevel, itemCategory, itemType, itemStackCount,
itemSubType, itemTexture, itemEquipLoc, itemSellPrice = addon.Modules.Utils:GetItemInfoSafe(itemID)
if addon and addon.Print then
addon:Print("itemTexture: %s", tostring(itemTexture))
addon:Print("itemCategory: %s", tostring(itemCategory))
addon:Print("itemType: %s", tostring(itemType))
addon:Print("itemType: %s", tostring(itemType))
end
end
end
end
--if self.hasItem then
-- local link = nil
-- if self.itemData and self.itemData.link then
-- link = self.itemData.link
-- else
-- -- Fallback to live bag query
-- link = GetContainerItemLink(self.bagID, self.slotID)
-- end
-- if link and addon and addon.Modules and addon.Modules.Utils and addon.Modules.Utils.ExtractItemID then
-- local itemID = addon.Modules.Utils:ExtractItemID(link)
-- if itemID and addon.Modules.Utils.GetItemInfoSafe then
-- local name, itemLink, itemRarity, itemLevel, itemCategory, itemType, itemStackCount,
-- itemSubType, itemTexture, itemEquipLoc, itemSellPrice = addon.Modules.Utils:GetItemInfoSafe(itemID)
-- if addon and addon.Print then
-- addon:Print("itemTexture: %s", tostring(itemTexture))
-- addon:Print("itemCategory: %s", tostring(itemCategory))
-- addon:Print("itemType: %s", tostring(itemType))
-- addon:Print("itemType: %s", tostring(itemType))
-- end
-- end
-- end
--end
-- Handle merchant sell cursor (same approach as BagShui)
if MerchantFrame:IsShown() and not self.isBank and not self.otherChar and self.hasItem then
ShowContainerSellCursor(self.bagID, self.slotID)