obble / modui_classic

modui: for wow classic
45 stars 20 forks source link

Transparent name background & remove name colorize #46

Open novikmisha opened 4 years ago

novikmisha commented 4 years ago

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

warsken commented 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

Screen Shot 2019-09-05 at 14 27 36

obble commented 4 years ago

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 :)

AmplusNLD commented 4 years ago

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.