Give this a try:
Code:
hooksecurefunc("DefaultCompactUnitFrameSetup", function(self)
local statusText = self.statusText
statusText:SetFont("Fonts\\ARIALN.TTF", 16)
statusText:SetShadowColor(0, 0, 0, 1)
statusText:SetShadowOffset(1, -1)
end)
hooksecurefunc("CompactUnitFrame_UpdateStatusText", function(self)
local statusText = self.statusText
if statusText and statusText:IsShown() then
if self.optionTable.healthText == "losthealth" and tonumber(statusText:GetText() or "") then
if not statusText.colorOverridden then
statusText.colorOverridden = true
statusText:SetTextColor(0.95, 0.1, 0.1, 1)
end
elseif statusText.colorOverridden then
statusText.colorOverridden = nil
statusText:SetTextColor(0.5, 0.5, 0.5, 1)
end
end
end)