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
+32
View File
@@ -1424,6 +1424,38 @@ function Guda_SettingsPopup_AutoOpenBagsCheckbox_OnClick(self)
end
end
-- Auto Close Bags Checkbox OnLoad
function Guda_SettingsPopup_AutoCloseBagsCheckbox_OnLoad(self)
local text = getglobal(self:GetName().."Text")
if text then
text:SetText("Auto Close Bags")
local font, _, flags = text:GetFont()
if font then
text:SetFont(font, 13, flags)
end
end
self.tooltipText = "Automatically close bags when closing bank, auction house, mail, trade, or vendor."
local enabled = false
if Guda and Guda.Modules and Guda.Modules.DB then
enabled = Guda.Modules.DB:GetSetting("autoCloseBags")
if enabled == nil then enabled = true end
end
self:SetChecked(enabled and 1 or 0)
end
-- Auto Close Bags Checkbox OnClick
function Guda_SettingsPopup_AutoCloseBagsCheckbox_OnClick(self)
local isChecked = self:GetChecked() == 1
if Guda and Guda.Modules and Guda.Modules.DB then
Guda.Modules.DB:SetSetting("autoCloseBags", isChecked)
end
end
-- White Items as Junk Checkbox OnLoad
function Guda_SettingsPopup_WhiteItemsJunkCheckbox_OnLoad(self)
local text = getglobal(self:GetName().."Text")