auto close bags

This commit is contained in:
Vati
2026-03-10 20:51:42 +04:00
parent e60bd02a47
commit 50930c06d4
4 changed files with 70 additions and 6 deletions
+19
View File
@@ -3491,8 +3491,27 @@ function BagFrame:Initialize()
addon.Modules.Events:Register("MERCHANT_CLOSED", function()
isMerchantOpen = false
local autoClose = addon.Modules.DB:GetSetting("autoCloseBags")
if autoClose == nil then autoClose = true end
if autoClose then
Guda_BagFrame:Hide()
end
end, "BagFrame")
-- Auto-close bag frame when closing mail, bank, auction, trade
local function AutoCloseBags()
local autoClose = addon.Modules.DB:GetSetting("autoCloseBags")
if autoClose == nil then autoClose = true end
if autoClose then
Guda_BagFrame:Hide()
end
end
addon.Modules.Events:Register("MAIL_CLOSED", AutoCloseBags, "BagFrame")
addon.Modules.Events:Register("BANKFRAME_CLOSED", AutoCloseBags, "BagFrame")
addon.Modules.Events:Register("AUCTION_HOUSE_CLOSED", AutoCloseBags, "BagFrame")
addon.Modules.Events:Register("TRADE_CLOSED", AutoCloseBags, "BagFrame")
-- Hide character dropdown when clicking on bag frame
local bagFrame = getglobal("Guda_BagFrame")
if bagFrame then