Thread Tools Display Modes
04-22-21, 05:28 PM   #1
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
NamePlate Background Opacity

Hello,

I changed my blizz nameplates like most of my UI with texture replacements but I cant change anything related to the nameplate-background this way.

Basically I want to lower the alpha/opacity of the nameplate health and its castbar background but without replacing the default nameplates.

I was searching for a code for similar changes but I couldn't find anything related.

If someone has an idea or code to share I would really appreciate it.

Blizz code: https://github.com/tomrus88/Blizzard....xml#L151-L154

Last edited by rulezyx : 04-23-21 at 10:17 AM.
  Reply With Quote
04-25-21, 12:56 PM   #2
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
I now use this code to change the background alpha/color for the nameplate health and castbar:

Code:
hooksecurefunc("CompactUnitFrame_UpdateHealthColor", function(frame)
	if not strfind(frame.unit, "nameplate") then return end
	frame.healthBar.background:SetAlpha(0.5)
	frame.healthBar.background:SetVertexColor(0,0,0)
	frame.castBar.background:SetAlpha(0.5)
	frame.castBar.background:SetVertexColor(0,0,0)
end)

Last edited by rulezyx : 04-25-21 at 01:10 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » NamePlate Background Opacity

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off