mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-06 21:50:00 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user