grayout item on trade, mail
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user