More progress on caching stuff; journal links; cooltip hotfixes; code cleanups

This commit is contained in:
Tercio Jose
2022-12-23 20:33:29 -03:00
parent ce9a3b875b
commit 7d5d80073b
10 changed files with 416 additions and 161 deletions
+8 -2
View File
@@ -15,7 +15,7 @@ local max = math.max
--api locals
local PixelUtil = PixelUtil or DFPixelUtil
local version = 11
local version = 12
local CONST_MENU_TYPE_MAINMENU = "main"
local CONST_MENU_TYPE_SUBMENU = "sub"
@@ -2649,10 +2649,12 @@ function DF:CreateCoolTip()
if (anchor and index == 1) then
local myAnchor, hisAnchor, x, y = unpack(anchor)
fontstring:ClearAllPoints()
fontstring:SetPoint(myAnchor, frame.upperImage, hisAnchor or myAnchor, x or 0, y or 0)
elseif (anchor and index == 2) then
local myAnchor, hisAnchor, x, y = unpack(anchor)
fontstring:ClearAllPoints()
fontstring:SetPoint(myAnchor, frame, hisAnchor or myAnchor, x or 0, y or 0)
end
@@ -2725,10 +2727,12 @@ function DF:CreateCoolTip()
if (type(anchor[1]) == "table") then
for anchorIndex, anchorPoints in ipairs(anchor) do
local myAnchor, hisAnchor, x, y = unpack(anchorPoints)
texture:ClearAllPoints()
texture:SetPoint(myAnchor, frame, hisAnchor or myAnchor, x or 0, y or 0)
end
else
local myAnchor, hisAnchor, x, y = unpack(anchor)
texture:ClearAllPoints()
texture:SetPoint(myAnchor, frame, hisAnchor or myAnchor, x or 0, y or 0)
end
end
@@ -2737,8 +2741,10 @@ function DF:CreateCoolTip()
local leftCoord, rightCoord, topCoord, bottomCoord = unpack(texCoord)
texture:SetTexCoord(leftCoord, rightCoord, topCoord, bottomCoord)
end
if (overlay) then
texture:SetVertexColor(unpack(overlay))
local red, green, blue, alpha = DF:ParseColors(overlay)
texture:SetVertexColor(red, green, blue, alpha)
end
gameCooltip.Banner[index] = true
+8 -1
View File
@@ -1,6 +1,6 @@
local dversion = 406
local dversion = 407
local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary(major, minor)
@@ -775,6 +775,13 @@ function DF:AddClassColorToText(text, className)
return text
end
function DF:MakeStringFromSpellId(spellId)
local spellName, _, spellIcon = GetSpellInfo(spellId)
if (spellName) then
return "|T" .. spellIcon .. ":16:16:0:0:64:64:4:60:4:60|t " .. spellName
end
end
function DF:GetClassTCoordsAndTexture(class)
local l, r, t, b = unpack(CLASS_ICON_TCOORDS[class])
return l, r, t, b, [[Interface\WORLDSTATEFRAME\Icons-Classes]]