comparison 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
comparison
equal deleted inserted replaced
50:8e2138877ebf 51:fcc7112cc365
20 uses = 0, 20 uses = 0,
21 general = { 21 general = {
22 defaultStatus = "disabled", -- addon enabled, but mail opening not auto on 22 defaultStatus = "disabled", -- addon enabled, but mail opening not auto on
23 defaultQAStatus = "__remember", 23 defaultQAStatus = "__remember",
24 continueOpeningStackableItems = false, 24 continueOpeningStackableItems = false,
25 showHelpTooltips = true,
25 autoDisableQAAutoMail = true, 26 autoDisableQAAutoMail = true,
26 autoReenableQAAutoMail = false, 27 autoReenableQAAutoMail = false,
27 autoSetBackQAAutoMail = true, 28 autoSetBackQAAutoMail = true,
28 continueOpening = false, 29 continueOpening = false,
29 waitTime = 5, 30 waitTime = 5,
202 end 203 end
203 end); 204 end);
204 check.tooltipTitle = "Mail Opener status"; 205 check.tooltipTitle = "Mail Opener status";
205 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."; 206 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.";
206 check:SetScript("OnEnter", function(self) 207 check:SetScript("OnEnter", function(self)
207 GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") 208 if MailOpener.db.profile.general.showHelpTooltips then
208 GameTooltip:SetPoint("BOTTOM", self, "BOTTOM") 209 GameTooltip:SetOwner(self, "ANCHOR_BOTTOM")
209 GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) 210 GameTooltip:SetPoint("BOTTOM", self, "BOTTOM")
210 211 GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1)
211 if type(self.tooltip) == "string" then 212
212 GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); 213 if type(self.tooltip) == "string" then
213 end 214 GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1);
214 215 end
215 GameTooltip:Show(); 216
217 GameTooltip:Show();
218 end
216 end); 219 end);
217 button:SetScript("OnLeave", function(self) 220 button:SetScript("OnLeave", function(self)
218 GameTooltip:Hide(); 221 GameTooltip:Hide();
219 end); 222 end);
220 223
245 --BETA:end 248 --BETA:end
246 end); 249 end);
247 button.tooltipTitle = "Mail Opener Config"; 250 button.tooltipTitle = "Mail Opener Config";
248 button.tooltip = "Click to open the configuration window for Mail Opener."; 251 button.tooltip = "Click to open the configuration window for Mail Opener.";
249 button:SetScript("OnEnter", function(self) 252 button:SetScript("OnEnter", function(self)
250 GameTooltip:SetOwner(self, "ANCHOR_BOTTOM") 253 if MailOpener.db.profile.general.showHelpTooltips then
251 GameTooltip:SetPoint("BOTTOM", self, "TOP") 254 GameTooltip:SetOwner(self, "ANCHOR_BOTTOM")
252 GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1) 255 GameTooltip:SetPoint("BOTTOM", self, "TOP")
253 256 GameTooltip:SetText(self.tooltipTitle, 1, .82, 0, 1)
254 if type(self.tooltip) == "string" then 257
255 GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1); 258 if type(self.tooltip) == "string" then
256 end 259 GameTooltip:AddLine(self.tooltip, 1, 1, 1, 1);
257 260 end
258 GameTooltip:Show(); 261
262 GameTooltip:Show();
263 end
259 end); 264 end);
260 button:SetScript("OnLeave", function(self) 265 button:SetScript("OnLeave", function(self)
261 GameTooltip:Hide(); 266 GameTooltip:Hide();
262 end); 267 end);
263 268