Add files via upload

This commit is contained in:
Relationship
2026-07-10 09:44:50 +01:00
committed by GitHub
parent 16705f72ac
commit 77154b7b11
6 changed files with 141 additions and 93 deletions
+30 -2
View File
@@ -44,6 +44,34 @@ local FONT_SIZE = 10
-- Widget references for refresh
local widgets = {}
-- Only settings that change the visual STRUCTURE of a bar need a full
-- RecreateAll (which tears every bar down and re-attaches on the next
-- scan). Everything else — filters, modes, alpha, colours — just needs
-- a soft UpdateAll, which is far less likely to leave plates without
-- bars while pooled nameplate frames are hidden.
local NEEDS_RECREATE = {
barHeight = true,
barWidthScale= true,
barOffsetY = true,
barOffsetX = true,
glowEnabled = true,
glowAsShadow = true,
glowSize = true,
showSpark = true,
showFillBG = true,
showText = true,
fontOutline = true,
fontSize = true,
}
local function ApplySettingChange(configKey)
if NEEDS_RECREATE[configKey] then
addon.Nameplates:RecreateAll()
else
addon.Nameplates:UpdateAll()
end
end
-- ==================================================================
-- Helper: safely set backdrop on a frame
-- ==================================================================
@@ -302,7 +330,7 @@ function addon.GUI:BuildSettings(parent)
else
this.checkMark:Hide()
end
addon.Nameplates:RecreateAll()
ApplySettingChange(configKey)
end)
local label = parent:CreateFontString(nil, "OVERLAY")
@@ -393,7 +421,7 @@ function addon.GUI:BuildSettings(parent)
else
valText:SetText(math.floor(val + 0.5) .. suffix)
end
addon.Nameplates:RecreateAll()
ApplySettingChange(configKey)
end)
y = y + 24