eqcompare: rewrite on top of ClassicAPI SetHyperlinkCompareItem

Drop the manual C_Item.GetItemStatDelta rendering (inline annotations
and bottom-block summary) in favor of driving native shopping tooltips
via SetHyperlinkCompareItem — the 3.3.5 flow now available through
ClassicAPI. Way less code, and Blizzard's own comparison rendering
handles all stat types uniformly.

Also revert the mode dropdown back to a single basestats checkbox — the
new implementation doesn't distinguish base vs extended (Blizzard's
tooltip shows everything the item exposes), so the two-level control
was redundant. Existing basestats configs pass through unchanged.

AtlasLootTooltip now goes through the shared HookTooltip helper instead
of a bespoke OnShow shim.
This commit is contained in:
Brues
2026-07-03 02:10:20 -05:00
parent 6570afb70a
commit e5c51fff48
4 changed files with 133 additions and 283 deletions
+3 -7
View File
@@ -2754,14 +2754,10 @@ pfUI:RegisterModule("gui", function ()
CreateConfig(nil, T["Show Movement Speed"], C.tooltip, "movespeed", "checkbox")
CreateConfig(nil, T["Custom Transparency"], C.tooltip, "alpha")
CreateConfig(nil, T["Status Bar Texture"], C.tooltip.statusbar, "texture", "dropdown", pfUI.gui.dropdowns.uf_bartexture)
CreateConfig(nil, T["Item Comparison"], C.tooltip.compare, "mode", "dropdown", {
"off:"..(T["Off"] or "Off"),
"base:"..(T["Base Stats"] or "Base Stats"),
"extended:"..(T["Extended Stats"] or "Extended Stats"),
})
CreateConfig(nil, T["Compare Item Base Stats"], C.tooltip.compare, "basestats", "checkbox")
local showAlways = CreateConfig(nil, T["Always Show Item Comparison"], C.tooltip.compare, "showalways", "checkbox")
local function gate()
local on = C.tooltip.compare.mode ~= "off"
local on = C.tooltip.compare.basestats == "1"
if on then
showAlways.input:Enable()
showAlways.caption:SetTextColor(1, 1, 1)
@@ -2772,7 +2768,7 @@ pfUI:RegisterModule("gui", function ()
end
gate()
pfUI.events:RegisterCallback("config:changed", function(_, cat, key)
if cat == C.tooltip.compare and key == "mode" then gate() end
if cat == C.tooltip.compare and key == "basestats" then gate() end
end, "eqcompare-showalways-gate")
CreateConfig(nil, T["Always Show Extended Vendor Values"], C.tooltip.vendor, "showalways", "checkbox")
CreateConfig(U["questitem"], T["Show Related Quest On Questitems"], C.tooltip.questitem, "showquest", "checkbox")