grayout item on trade, mail

This commit is contained in:
Salikh Gurgenidze
2025-11-20 00:51:39 +04:00
parent 495ce86c88
commit 4d5f84e73c
4 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: Guda
## Notes: All-in-one bag and bank addon for Turtle WoW
## Author: Vati
## Version: 1.0.7
## Version: 1.0.8
## SavedVariables: Guda_DB
## SavedVariablesPerCharacter: Guda_CharDB
+7
View File
@@ -1764,6 +1764,13 @@ function BagFrame:Initialize()
BagFrame:UpdateMoney()
end, "BagFrame")
-- Update when items get locked/unlocked (for trading, mailing, etc.)
addon.Modules.Events:Register("ITEM_LOCK_CHANGED", function()
if not currentViewChar then
BagFrame:Update()
end
end, "BagFrame")
-- Hide character dropdown when clicking on bag frame
local bagFrame = getglobal("Guda_BagFrame")
if bagFrame then
+7
View File
@@ -821,6 +821,13 @@ function BankFrame:Initialize()
end
end, "BankFrameUI")
-- Update when items get locked/unlocked (for trading, mailing, etc.)
addon.Modules.Events:Register("ITEM_LOCK_CHANGED", function()
if addon.Modules.BankScanner:IsBankOpen() and not currentViewChar then
addon.Modules.BankFrame:Update()
end
end, "BankFrameUI")
-- Register bank-specific update events (pfUI style)
local updateFrame = CreateFrame("Frame")
updateFrame:RegisterEvent("PLAYERBANKSLOTS_CHANGED")
+6
View File
@@ -136,6 +136,12 @@ function Guda_ItemButton_SetItem(self, bagID, slotID, itemData, isBank, otherCha
-- Set icon
SetItemButtonTexture(self, itemData.texture)
-- Gray out locked items (being traded, mailed, or auctioned) - BagShui style
-- Don't desaturate items from other characters since they're read-only anyway
if not self.otherChar and not self.isReadOnly then
SetItemButtonDesaturated(self, itemData.locked, 0.5, 0.5, 0.5)
end
-- Hide NormalTexture for filled slots (pfUI style)
self:SetNormalTexture("")
local normalBorder = getglobal(self:GetName().."NormalTexture")