Mercurial > wow > mailopener
diff Core.lua @ 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 | 75c36b3d5443 |
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();
