View Single Post
01-05-20, 07:12 PM   #18
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
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)
  Reply With Quote