Add OEVG nameplate appearance options

Match ShaguTweaks border themes, add modern health and cast textures, and make the level number adjustable. Keep target color on the border and use a dark masked level inset.
This commit is contained in:
2026-11-08 23:05:57 -04:00
parent 69a39b5709
commit 2f671797f1
21 changed files with 470 additions and 40 deletions
+7 -3
View File
@@ -10,9 +10,8 @@ BNP = BNP or {}
-- heartbeat and no layout/parent/anchor enforcement here, so BNP never fights
-- WorldFrame movement while the player/camera is moving.
local BORDER_TEXTURE = "Interface\\AddOns\\BlizzNameplatesPlus\\media\\classic_nameplate_border.tga"
local BORDER_TEXTURE = "Interface\\AddOns\\BlizzNameplatesPlus\\media\\classic_nameplate_border_healthlevel.tga"
local GLOW_TEXTURE = "Interface\\AddOns\\BlizzNameplatesPlus\\media\\classic_nameplate_glow.tga"
local DARK_BORDER_R, DARK_BORDER_G, DARK_BORDER_B, DARK_BORDER_A = 0.3, 0.3, 0.3, 0.9
local function IsTotemIconOnly(plate)
return plate and plate.BNPTotemLastKey and
@@ -77,7 +76,7 @@ local function ApplyBorderStyle(plate)
if BNP.IsDarkNameplateBorderEnabled and BNP:IsDarkNameplateBorderEnabled() then
-- Match ShaguTweaks' default Darkened UI color, but touch only the native
-- nameplate border. Healthbars, glows, castbars and icons stay unchanged.
SetBorderVertexColor(border, DARK_BORDER_R, DARK_BORDER_G, DARK_BORDER_B, DARK_BORDER_A)
SetBorderVertexColor(border, BNP:GetRecoloredBorderColor())
else
-- This option is authoritative for the nameplate border. In particular,
-- switching it off must restore the original gold even when ShaguTweaks'
@@ -158,9 +157,12 @@ function BNP:RepairNativeNameplateVisuals(plate)
RestoreBorder(plate)
RestoreGlow(plate)
if self.ApplyModernHealthTexture then self:ApplyModernHealthTexture(plate) end
ApplyBorderStyle(plate)
ApplyLevelVisibility(plate)
ApplyHealthbarBackground(plate)
self:ApplyLevelNumberScale(plate)
self:UpdateLevelBackground(plate)
-- Native repair uses the original gold artwork. Reapply a target-specific
-- colored border immediately so White/Blue do not flash gold after OnShow,
@@ -171,6 +173,7 @@ function BNP:RepairNativeNameplateVisuals(plate)
end
function BNP:RefreshNameplateBorderStyle()
if self.RefreshAuraBorderColors then self:RefreshAuraBorderColors() end
local plate
for plate in pairs(BNP.plates or {}) do
self:RepairNativeNameplateVisuals(plate)
@@ -200,6 +203,7 @@ function BNP:RefreshHealthbarBackground()
local plate
for plate in pairs(BNP.plates or {}) do
ApplyHealthbarBackground(plate)
self:UpdateLevelBackground(plate)
end
if self.RefreshPersonalNameplateStyle then self:RefreshPersonalNameplateStyle() end
end