WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   NamePlate Background Opacity (https://www.wowinterface.com/forums/showthread.php?t=58703)

rulezyx 04-22-21 05:28 PM

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

rulezyx 04-25-21 12:56 PM

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)



All times are GMT -6. The time now is 10:26 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI