From 9c4985f574c23515b4e574073befc71eda705731 Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Tue, 6 Apr 2010 03:29:28 -0400 Subject: [PATCH] Added a checkbox in the Display Options section of the configuration to toggle the display of unknown recipes in unit tooltips. --- ARL.lua | 4 ++++ Config.lua | 13 +++++++++++++ Locales/devel-enUS.lua | 2 ++ 3 files changed, 19 insertions(+) diff --git a/ARL.lua b/ARL.lua index 96bbcc4..5773cf0 100644 --- a/ARL.lua +++ b/ARL.lua @@ -218,6 +218,7 @@ function addon:OnInitialize() scanbuttonlocation = "TR", spelltooltiplocation = "Right", acquiretooltiplocation = "Right", + recipes_in_tooltips = true, hidepopup = false, minimap = true, worldmap = true, @@ -490,6 +491,9 @@ function addon:OnInitialize() ------------------------------------------------------------------------------- GameTooltip:HookScript("OnTooltipSetUnit", function(self) + if not addon.db.profile.recipes_in_tooltips then + return + end local name, unit = self:GetUnit() if not unit then diff --git a/Config.lua b/Config.lua index 58e96bc..1890b24 100644 --- a/Config.lua +++ b/Config.lua @@ -710,6 +710,19 @@ local function giveDisplay() } end, }, + unit_tooltip = { + order = 23, + type = "toggle", + width = "full", + name = L["Recipes In Tooltips"], + desc = L["UNIT_TOOLTIPS_DESC"], + get = function() + return addon.db.profile.recipes_in_tooltips + end, + set = function() + addon.db.profile.recipes_in_tooltips = not addon.db.profile.recipes_in_tooltips + end, + }, }, } end diff --git a/Locales/devel-enUS.lua b/Locales/devel-enUS.lua index 956fd49..86fda26 100644 --- a/Locales/devel-enUS.lua +++ b/Locales/devel-enUS.lua @@ -148,6 +148,8 @@ L["Tooltip (Recipe) Position"] = true L["SPELLTOOLTIPPOSITION_DESC"] = "Changes the location of the tooltip containing the recipe information." L["Tooltip (Acquire) Position"] = true L["ACQUIRETOOLTIPPOSITION_DESC"] = "Changes the location of the tooltip containing the acquire information." +L["Recipes In Tooltips"] = true +L["UNIT_TOOLTIPS_DESC"] = "Toggles whether or not to display unknown recipes in the tooltips of the vendors, trainers, or mobs which carry them." L["FONT_SIZE_DESC"] = "Changes the size of the fonts for ARL." L["Sorting"] = true L["Sort"] = true -- 1.7.9.5