auto close bags
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user