I want to make a couple of minor adjustments to the standard unitframe
i want the name part of my target/ToT/Focus to be the class color i found a small addon that
changes the health bar to the class color but it's not exactly what i want, and maybe make the Name of the target/tot/focus a easier color to see against there class color, maybe white/greyish?
am i able to change this in anyway to help what i want to achieve?
local UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS =
UnitIsPlayer, UnitIsConnected, UnitClass, RAID_CLASS_COLORS
local _, class, c
local function colour(statusbar, unit)
if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
_, class = UnitClass(unit)
c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
statusbar:SetStatusBarColor(c.r, c.g, c.b)
end
end
hooksecurefunc("UnitFrameHealthBar_Update", colour)
hooksecurefunc("HealthBar_OnValueChanged", function(self)
colour(self, self.unit)
end)
local sb = _G.GameTooltipStatusBar
local addon = CreateFrame("Frame", "StatusColour")
addon:RegisterEvent("UPDATE_MOUSEOVER_UNIT")
addon:SetScript("OnEvent", function()
colour(sb, "mouseover")
end)
|
Also i want to see % of health in the health bar and also a health number something like 234.5k which deceases as the lose hp and incease as healed
cheers if anyone can help