diff --git a/Guda.toc b/Guda.toc index fc8e63f..0d1ea53 100644 --- a/Guda.toc +++ b/Guda.toc @@ -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 diff --git a/UI/BagFrame.lua b/UI/BagFrame.lua index db74da2..b98cc2b 100644 --- a/UI/BagFrame.lua +++ b/UI/BagFrame.lua @@ -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 diff --git a/UI/BankFrame.lua b/UI/BankFrame.lua index ca8169e..4a95e21 100644 --- a/UI/BankFrame.lua +++ b/UI/BankFrame.lua @@ -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") diff --git a/UI/ItemButton.lua b/UI/ItemButton.lua index aebbff3..6af5821 100644 --- a/UI/ItemButton.lua +++ b/UI/ItemButton.lua @@ -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")