View Single Post
01-15-20, 01:09 AM   #32
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Code:
hooksecurefunc("DefaultCompactUnitFrameSetup", function(self)
	local fontSize = 12 * min(DefaultCompactUnitFrameSetupOptions.height / 36, DefaultCompactUnitFrameSetupOptions.width / 72)
	local statusText = self.statusText
	statusText:SetFont("Fonts\\ARIALN.TTF", fontSize)
	statusText:SetHeight(fontSize)
	statusText:SetShadowColor(0, 0, 0, 1)
	statusText:SetShadowOffset(1, -1)
        :ClearAllPoints()
        statusText:SetPoint("CENTER", 0, -10)
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)
Ok I tried that but it doesnt matter if I put it to compact or default its still in the same position.

Maybe I missed something.

Last edited by rulezyx : 01-16-20 at 02:17 AM. Reason: correction
  Reply With Quote