feat(tooltip): add data-source attribution line to tooltips

Objective tooltips (Tooltip.lua) and world-map icon tooltips
(MapIconTooltip.lua) now append a greyed-out 'Source:' line listing the
data origin: Static DB or Learner per the active data-source mode, plus
Comms when remote player data exists for the key. Also corrects an
internal QuestieDB:GetQuest colon call to the dot form QuestieDB.GetQuest.
This commit is contained in:
Xurkon
2026-06-08 07:59:24 -05:00
parent 79e877f4c9
commit acc829ebba
3 changed files with 59 additions and 1 deletions
+10
View File
@@ -69,6 +69,14 @@ local DEFAULT_WAYPOINT_HOVER_COLOR = { 0.93, 0.46, 0.13, 0.8 }
local lastTooltipShowTimestamp = GetTime()
local function _GetWorldMapTooltipSourceLine()
local parts = { "Questie DB" }
if QuestieComms and (QuestieComms.remotePlayerEnabled or QuestieComms.data) then
tinsert(parts, "Comms")
end
return "|cFF808080Source: " .. table.concat(parts, " + ") .. "|r"
end
function MapIconTooltip:Show()
local _, _, _, alpha = self.texture:GetVertexColor();
if alpha == 0 then
@@ -716,6 +724,8 @@ function MapIconTooltip:Show()
self:AddLine('|cFFa6a6a6Shift-click to hide|r') -- grey
end
end
self:AddLine(_GetWorldMapTooltipSourceLine(), 0.55, 0.55, 0.55)
end
Tooltip:_Rebuild() -- we separate this so things like MODIFIER_STATE_CHANGED can redraw the tooltip
Tooltip:SetFrameStrata("TOOLTIP");