Open novikmisha opened 4 years ago
This will make your, enemy, and friendly players hp bar class colored
hooksecurefunc("PlayerFrame_UpdateStatus", function() if IsResting("player") then PlayerStatusTexture:Hide() PlayerRestGlow:Hide() PlayerStatusGlow:Hide() end end)
hooksecurefunc("HealthBar_OnValueChanged", function (self) if UnitIsPlayer(self.unit) then local c = RAID_CLASS_COLORS[select(2,UnitClass(self.unit))]; if c then self:SetStatusBarColor(c.r, c.g, c.b) end end end);
hooksecurefunc("UnitFrameHealthBar_Update", function (self) if UnitIsPlayer(self.unit) then local c = RAID_CLASS_COLORS[select(2,UnitClass(self.unit))]; if c then self:SetStatusBarColor(c.r, c.g, c.b) end end end);
hooksecurefunc('TargetFrame_CheckFaction', function(self) if ( not UnitPlayerControlled(self.unit) and UnitIsTapDenied(self.unit)) then self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5); if ( self.portrait ) then self.portrait:SetVertexColor(0.5, 0.5, 0.5); end else self.nameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5); if ( self.portrait ) then self.portrait:SetVertexColor(1.0, 1.0, 1.0); end end end)
This will make name text colored white for i, f in pairs({TargetFrame, PlayerFrame, FocusFrame}) do f.name:SetVertexColor(1,10,10) end
And this will make a target name bg texture same as the player's one TargetFrameNameBackground:SetVertexColor(0.0, 0.0, 0.0, 0.5) everything works like a charm
Good idea - I'd like to generally improve the amount of customisation the user has access to on unitframes for things like this. I'm planning on working on it in the next few days before I go away and have no access to a computer across next week :)
I also like the idea of having the HP bar class colored. I used to have that on retail aswell. And have it colored to the aggro state for general mobs. Like red or yellow.
Can we have an option to remove name background texture? And also stop colorizing name to leave it like (1, 0.8, 0) (also like an option)? For me, with this options unitframes become amazing. I did it in my fork but you make a lot of stuff today so I dont have time to rebase fork. Can provide you a screenshot of how it will look after those changes. Amazing addong btw