version: 1.4.0 fixes
This commit is contained in:
+21
-1
@@ -372,9 +372,21 @@ function BagFrame:GetSectionHeader(index)
|
|||||||
if not header then
|
if not header then
|
||||||
header = CreateFrame("Frame", name, getglobal("Guda_BagFrame_ItemContainer"))
|
header = CreateFrame("Frame", name, getglobal("Guda_BagFrame_ItemContainer"))
|
||||||
header:SetHeight(20)
|
header:SetHeight(20)
|
||||||
|
header:EnableMouse(true)
|
||||||
local text = header:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
local text = header:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||||
text:SetPoint("LEFT", header, "LEFT", 0, 0)
|
text:SetPoint("LEFT", header, "LEFT", 0, 0)
|
||||||
header.text = text
|
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
|
end
|
||||||
header.inUse = true
|
header.inUse = true
|
||||||
return header
|
return header
|
||||||
@@ -556,7 +568,15 @@ function BagFrame:DisplayItemsByCategory(bagData, isOtherChar, charName)
|
|||||||
headerIdx = headerIdx + 1
|
headerIdx = headerIdx + 1
|
||||||
header:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", startX + currentX, startY - currentY)
|
header:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", startX + currentX, startY - currentY)
|
||||||
header:SetWidth(blockWidth)
|
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()
|
header:Show()
|
||||||
|
|
||||||
local itemY = currentY + 20
|
local itemY = currentY + 20
|
||||||
|
|||||||
+21
-1
@@ -224,9 +224,21 @@ function BankFrame:GetSectionHeader(index)
|
|||||||
if not header then
|
if not header then
|
||||||
header = CreateFrame("Frame", name, getglobal("Guda_BankFrame_ItemContainer"))
|
header = CreateFrame("Frame", name, getglobal("Guda_BankFrame_ItemContainer"))
|
||||||
header:SetHeight(20)
|
header:SetHeight(20)
|
||||||
|
header:EnableMouse(true)
|
||||||
local text = header:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
local text = header:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||||
text:SetPoint("LEFT", header, "LEFT", 0, 0)
|
text:SetPoint("LEFT", header, "LEFT", 0, 0)
|
||||||
header.text = text
|
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
|
end
|
||||||
header.inUse = true
|
header.inUse = true
|
||||||
return header
|
return header
|
||||||
@@ -408,7 +420,15 @@ function BankFrame:DisplayItemsByCategory(bankData, isOtherChar, charName)
|
|||||||
headerIdx = headerIdx + 1
|
headerIdx = headerIdx + 1
|
||||||
header:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", startX + currentX, startY - currentY)
|
header:SetPoint("TOPLEFT", itemContainer, "TOPLEFT", startX + currentX, startY - currentY)
|
||||||
header:SetWidth(blockWidth)
|
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()
|
header:Show()
|
||||||
|
|
||||||
local itemY = currentY + 20
|
local itemY = currentY + 20
|
||||||
|
|||||||
+22
-22
@@ -957,28 +957,28 @@ function Guda_ItemButton_OnEnter(self)
|
|||||||
|
|
||||||
-- Debug: print hovered item's texture path to chat
|
-- Debug: print hovered item's texture path to chat
|
||||||
-- Uses GetItemInfo on the hovered item's ID
|
-- Uses GetItemInfo on the hovered item's ID
|
||||||
if self.hasItem then
|
--if self.hasItem then
|
||||||
local link = nil
|
-- local link = nil
|
||||||
if self.itemData and self.itemData.link then
|
-- if self.itemData and self.itemData.link then
|
||||||
link = self.itemData.link
|
-- link = self.itemData.link
|
||||||
else
|
-- else
|
||||||
-- Fallback to live bag query
|
-- -- Fallback to live bag query
|
||||||
link = GetContainerItemLink(self.bagID, self.slotID)
|
-- link = GetContainerItemLink(self.bagID, self.slotID)
|
||||||
end
|
-- end
|
||||||
if link and addon and addon.Modules and addon.Modules.Utils and addon.Modules.Utils.ExtractItemID then
|
-- if link and addon and addon.Modules and addon.Modules.Utils and addon.Modules.Utils.ExtractItemID then
|
||||||
local itemID = addon.Modules.Utils:ExtractItemID(link)
|
-- local itemID = addon.Modules.Utils:ExtractItemID(link)
|
||||||
if itemID and addon.Modules.Utils.GetItemInfoSafe then
|
-- if itemID and addon.Modules.Utils.GetItemInfoSafe then
|
||||||
local name, itemLink, itemRarity, itemLevel, itemCategory, itemType, itemStackCount,
|
-- local name, itemLink, itemRarity, itemLevel, itemCategory, itemType, itemStackCount,
|
||||||
itemSubType, itemTexture, itemEquipLoc, itemSellPrice = addon.Modules.Utils:GetItemInfoSafe(itemID)
|
-- itemSubType, itemTexture, itemEquipLoc, itemSellPrice = addon.Modules.Utils:GetItemInfoSafe(itemID)
|
||||||
if addon and addon.Print then
|
-- if addon and addon.Print then
|
||||||
addon:Print("itemTexture: %s", tostring(itemTexture))
|
-- addon:Print("itemTexture: %s", tostring(itemTexture))
|
||||||
addon:Print("itemCategory: %s", tostring(itemCategory))
|
-- addon:Print("itemCategory: %s", tostring(itemCategory))
|
||||||
addon:Print("itemType: %s", tostring(itemType))
|
-- addon:Print("itemType: %s", tostring(itemType))
|
||||||
addon:Print("itemType: %s", tostring(itemType))
|
-- addon:Print("itemType: %s", tostring(itemType))
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
end
|
--end
|
||||||
-- Handle merchant sell cursor (same approach as BagShui)
|
-- Handle merchant sell cursor (same approach as BagShui)
|
||||||
if MerchantFrame:IsShown() and not self.isBank and not self.otherChar and self.hasItem then
|
if MerchantFrame:IsShown() and not self.isBank and not self.otherChar and self.hasItem then
|
||||||
ShowContainerSellCursor(self.bagID, self.slotID)
|
ShowContainerSellCursor(self.bagID, self.slotID)
|
||||||
|
|||||||
Reference in New Issue
Block a user