eqcompare: collapse basestats/extendedstats checkboxes into a mode dropdown

Replace the two-checkbox arrangement (Compare Base Stats + Compare
Extended Stats, with the latter gated on the former) with a single
"Item Comparison" dropdown offering Off / Base / Extended. Migrate
existing configs.

Also route CreateConfig's value-change sites through pfUI.events
("config:changed", category, config) so callers can react to arbitrary
setting changes without frame-specific plumbing. Use it here to grey
out "Always Show Item Comparison" when the mode is Off.
This commit is contained in:
Brues
2026-07-02 03:05:56 -05:00
parent 0f97e8b0bd
commit 6570afb70a
3 changed files with 46 additions and 24 deletions
+3 -2
View File
@@ -252,12 +252,13 @@ pfUI:RegisterModule("eqcompare", function ()
AddHeader(ShoppingTooltip2)
end
if C.tooltip.compare.basestats == "1" then
local mode = C.tooltip.compare.mode
if mode ~= "off" then
local equippedLink = GetInventoryItemLink("player", slotID)
if newLink and equippedLink then
local delta = C_Item.GetItemStatDelta(equippedLink, newLink)
if delta then
if C.tooltip.compare.extendedstats == "1" then
if mode == "extended" then
local keys = {}
for _, k in ipairs(BASE_STAT_KEYS) do table.insert(keys, k) end
for _, k in ipairs(EXTENDED_STAT_KEYS) do table.insert(keys, k) end