diff --git a/ARLConfig.lua b/ARLConfig.lua index 3db1a39..6b16a9d 100644 --- a/ARLConfig.lua +++ b/ARLConfig.lua @@ -1120,8 +1120,17 @@ local function fullOptions() if ( arlTooltip2 ) then arlTooltip:SetScale( v ) end end, }, - spacer2 = { + spelltooltiplocation = { order = 32, + type = "select", + name = L["Tooltip (Recipe) Position"], + desc = L["SPELLTOOLTIPPOSITION_DESC"], + get = function() return addon.db.profile.spelltooltiplocation end, + set = function(info,name) addon.db.profile.spelltooltiplocation = name end, + values = function() return {Right = L["Right"], Left = L["Left"], Top = L["Top"], Bottom = L["Bottom"], Off = L["Off"]} end, + }, + spacer2 = { + order = 39, type = "description", name = "\n", }, diff --git a/ARLFrame.lua b/ARLFrame.lua index 74b8ac1..01c0c1c 100644 --- a/ARLFrame.lua +++ b/ARLFrame.lua @@ -767,20 +767,23 @@ local function GenerateTooltipContent(owner, rIndex, playerFaction, exclude) gttAdd(0, -1, 0, 1, L["SHIFT_CLICK"], clr1) local spelllink = recipeDB[rIndex]["RecipeLink"] + local spelltooltiplocation = addon.db.profile.spelltooltiplocation - if (spelllink) then - + if (spelltooltiplocation ~= L["Off"]) and (spelllink) then arlTooltip2:SetOwner(arlTooltip, "ANCHOR_NONE") - --arlTooltip2:ClearAllPoints() - --arlTooltip2:SetPoint("TOPLEFT", arlTooltip, "TOPRIGHT") - arlTooltip2:SetPoint("TOPRIGHT", arlTooltip, "TOPLEFT") + if (spelltooltiplocation == L["Top"]) then + arlTooltip2:SetPoint("BOTTOM", arlTooltip, "TOP") + elseif (spelltooltiplocation == L["Bottom"]) then + arlTooltip2:SetPoint("TOP", arlTooltip, "BOTTOM") + elseif (spelltooltiplocation == L["Left"]) then + arlTooltip2:SetPoint("TOPRIGHT", arlTooltip, "TOPLEFT") + elseif (spelltooltiplocation == L["Right"]) then + arlTooltip2:SetPoint("TOPLEFT", arlTooltip, "TOPRIGHT") + end arlTooltip2:SetHyperlink(spelllink) arlTooltip2:Show() - else - arlTooltip2:Hide() - end arlTooltip:Show() diff --git a/AckisRecipeList.lua b/AckisRecipeList.lua index 3ce1617..546fe5e 100644 --- a/AckisRecipeList.lua +++ b/AckisRecipeList.lua @@ -134,6 +134,7 @@ function addon:OnInitialize() closeguionskillclose = false, ignoreexclusionlist = false, scanbuttonlocation = L["Right"], + spelltooltiplocation = L["Right"], -- Recipe Exclusion exclusionlist = {}, diff --git a/Locals/ARLLocals-enUS.lua b/Locals/ARLLocals-enUS.lua index a475974..a71d714 100644 --- a/Locals/ARLLocals-enUS.lua +++ b/Locals/ARLLocals-enUS.lua @@ -90,6 +90,8 @@ L["UI Scale"] = true L["UI_SCALE_DESC"] = "Changes the scale of the UI. Ranges from .5 to 1.5 (1 is default)" L["Tooltip Scale"] = true L["TOOLTIP_SCALE_DESC"] = "Changes the scale of the ARL tooltip. Ranges from .5 to 1.5 (.9 is default)" +L["Tooltip (Recipe) Position"] = true +L["SPELLTOOLTIPPOSITION_DESC"] = "Changes the location of the tooltip containing the recipe information." L["Sorting"] = true L["Sort"] = true L["Display"] = true @@ -97,6 +99,9 @@ L["SORTING_DESC"] = "Change the way in which displayed recipes are sorted." L["Version"] = "Version: " L["Right"] = true L["Left"] = true +L["Off"] = true +L["Top"] = true +L["Bottom"] = true L["Name"] = true L["Skill"] = true L["Location"] = true