Mercurial > wow > mailopener
changeset 51:fcc7112cc365
You can now toggle the help tooltips for the Mail Opener-added MailFrame buttons in the general config.
| author | Zerotorescue |
|---|---|
| date | Sun, 12 Sep 2010 21:13:27 +0200 |
| parents | 8e2138877ebf |
| children | 3de62cef2ee2 |
| files | Core.lua Modules/Config.lua Modules/OpenAll.lua |
| diffstat | 3 files changed, 40 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/Core.lua Sun Sep 12 21:06:05 2010 +0200 +++ b/Core.lua Sun Sep 12 21:13:27 2010 +0200 @@ -22,6 +22,7 @@ defaultStatus = "disabled", -- addon enabled, but mail opening not auto on defaultQAStatus = "__remember", continueOpeningStackableItems = false, + showHelpTooltips = true, autoDisableQAAutoMail = true, autoReenableQAAutoMail = false, autoSetBackQAAutoMail = true, @@ -204,15 +205,17 @@ check.tooltipTitle = "Mail Opener status"; check.tooltip = "Toggle automatic mail opening |cff00ff00on|r or |cffff0000off|r (you can also enforce this by holding shift when opening the mailbox).\n\nYou can also hold the |cfffed000shift|r key while clicking this checkbox to disable the entire addon instead."; check:SetScript("OnEnter", function(self) - GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") - GameTooltip:SetPoint("BOTTOM", self, "BOTTOM") - GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) - - if type(self.tooltip) == "string" then - GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + if MailOpener.db.profile.general.showHelpTooltips then + GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") + GameTooltip:SetPoint("BOTTOM", self, "BOTTOM") + GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) + + if type(self.tooltip) == "string" then + GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + end + + GameTooltip:Show(); end - - GameTooltip:Show(); end); button:SetScript("OnLeave", function(self) GameTooltip:Hide(); @@ -247,15 +250,17 @@ button.tooltipTitle = "Mail Opener Config"; button.tooltip = "Click to open the configuration window for Mail Opener."; button:SetScript("OnEnter", function(self) - GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") - GameTooltip:SetPoint("BOTTOM", self, "TOP") - GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) - - if type(self.tooltip) == "string" then - GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + if MailOpener.db.profile.general.showHelpTooltips then + GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") + GameTooltip:SetPoint("BOTTOM", self, "TOP") + GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) + + if type(self.tooltip) == "string" then + GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + end + + GameTooltip:Show(); end - - GameTooltip:Show(); end); button:SetScript("OnLeave", function(self) GameTooltip:Hide();
--- a/Modules/Config.lua Sun Sep 12 21:06:05 2010 +0200 +++ b/Modules/Config.lua Sun Sep 12 21:13:27 2010 +0200 @@ -311,6 +311,15 @@ get = function() return MailOpener.db.profile.general.continueOpeningStackableItems; end, set = function(i, v) MailOpener.db.profile.general.continueOpeningStackableItems = v; end, }, + showHelpTooltips = { + order = 17, + type = "toggle", + name = "Display help tooltips at the mailbox buttons added by Mail Opener.", + desc = "Display the help tooltips when hovering at any of the mailbox buttons added by Mail Opener.", + width = "full", + get = function() return MailOpener.db.profile.general.showHelpTooltips; end, + set = function(i, v) MailOpener.db.profile.general.showHelpTooltips = v; end, + }, autoDisableQAAutoMail = { order = 20, type = "toggle",
--- a/Modules/OpenAll.lua Sun Sep 12 21:06:05 2010 +0200 +++ b/Modules/OpenAll.lua Sun Sep 12 21:13:27 2010 +0200 @@ -139,15 +139,17 @@ button.tooltipTitle = "Open all"; button.tooltip = "Hold |cfffed000shift|r while clicking this button to temporarily override your filters and loot every single mail contain attachments and gold.\n\n|cfffed000Right|r click this button to quickly adjust mail opening filters for this profile."; button:SetScript("OnEnter", function(self) - GameTooltip:SetOwner(self, "ANCHOR_NONE") - GameTooltip:SetPoint("BOTTOM", self, "TOP") - GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) - - if type(self.tooltip) == "string" then - GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + if MailOpener.db.profile.general.showHelpTooltips then + GameTooltip:SetOwner(self, "ANCHOR_NONE") + GameTooltip:SetPoint("BOTTOM", self, "TOP") + GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) + + if type(self.tooltip) == "string" then + GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); + end + + GameTooltip:Show(); end - - GameTooltip:Show(); end); button:SetScript("OnLeave", function(self) GameTooltip:Hide();
