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
+16 -2
View File
@@ -751,8 +751,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("tooltip", nil, "movespeed", "0")
pfUI:UpdateConfig("tooltip", nil, "alpha", "0.8")
pfUI:UpdateConfig("tooltip", nil, "alwaysperc", "0")
pfUI:UpdateConfig("tooltip", "compare", "basestats", "1")
pfUI:UpdateConfig("tooltip", "compare", "extendedstats", "1")
pfUI:UpdateConfig("tooltip", "compare", "mode", "extended")
pfUI:UpdateConfig("tooltip", "compare", "showalways", "0")
pfUI:UpdateConfig("tooltip", "vendor", "showalways", "1")
pfUI:UpdateConfig("tooltip", "questitem", "showquest", "1")
@@ -1373,6 +1372,21 @@ function pfUI:MigrateConfig()
end
end
-- migrate tooltip.compare.basestats + extendedstats into a single mode dropdown
if pfUI_config.tooltip and pfUI_config.tooltip.compare then
local cmp = pfUI_config.tooltip.compare
if cmp.basestats or cmp.extendedstats then
if cmp.basestats == "0" then
cmp.mode = "off"
elseif cmp.extendedstats == "0" then
cmp.mode = "base"
else
cmp.mode = "extended"
end
cmp.basestats = nil
cmp.extendedstats = nil
end
end
-- Remove "Show only own debuffs" from unitframes and nameplates
-- (feature was removed; only Target Debuff Bar in buffwatch keeps it)