Thread Tools Display Modes
01-05-20, 11:12 PM   #21
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Ok I tried that but unfortunately nothing changed/happend.

I could just change the fontsize from 16 to 14 or something but when I switch to other profiles like for 5 or 10/20 man groups (Bigger Frames) the fontsize is still the same and doesnt match the size of the Frames at all (too small). Thats why I am asking.
  Reply With Quote
01-06-20, 07:03 AM   #22
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Try changing the line (before the last change):
Code:
statusText:SetFont("Fonts\\ARIALN.TTF", 16)
to:
Code:
statusText:SetFont("Fonts\\ARIALN.TTF", 16 * min(DefaultCompactUnitFrameSetupOptions.height / 36, DefaultCompactUnitFrameSetupOptions.width / 72))
  Reply With Quote
01-06-20, 12:52 PM   #23
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
I tried that but the size is still the same as before
  Reply With Quote
01-06-20, 05:42 PM   #24
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Give this a shot:
Code:
hooksecurefunc("DefaultCompactUnitFrameSetup", function(self)
	local fontSize = 16 * 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)
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
01-06-20, 07:12 PM   #25
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
I guess it did everything because the font-size is pretty much the same related/matched to all the frame profiles. I think I will go with 12 instead of 16 because its pretty big but I think thats it

Where do I put outline if I want to change that?

Last edited by rulezyx : 01-06-20 at 07:16 PM.
  Reply With Quote
01-06-20, 07:32 PM   #26
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Same as before:
Code:
statusText:SetFont("Fonts\\ARIALN.TTF", fontSize, "OUTLINE")
  Reply With Quote
01-06-20, 08:37 PM   #27
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
is it possible to make the outline smaller / thinner like with the shadow?
  Reply With Quote
01-06-20, 08:42 PM   #28
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
No. The only other option is "THICKOUTLINE" in place of "OUTLINE" which makes is thicker.
  Reply With Quote
01-06-20, 09:06 PM   #29
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Ok, ty so much
  Reply With Quote
01-14-20, 09:00 AM   #30
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
change position

I was trying to display the text a bit lower because in default its directly in the middle of the frame. I use other mods to display buffs / heals on the other half and with bigger frames those are overlapping with lost-health text.

I tried: statusText:SetPoint("CENTER", 0, -10)

but that doesnt seem to work at all.

It seems the text is always locked to the middle of the frame. Any suggestions?
  Reply With Quote
01-14-20, 01:16 PM   #31
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
You need to clear it's original position first.

(:ClearAllPoints())
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
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
01-16-20, 02:29 AM   #33
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
I think the clear statement works but I dont know about setpoint. The text seems to be stuck there in the middle.
  Reply With Quote
01-16-20, 04:37 AM   #34
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Code:
:ClearAllPoints()
should be
Code:
statusText:ClearAllPoints()
  Reply With Quote
01-16-20, 05:52 AM   #35
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Ok thats working Ty
  Reply With Quote
01-18-20, 05:17 AM   #36
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Is it possible to put the text in the foreground? Sometimes with bigger numbers its behind an aura/buff. is there a way to fix that?

Last edited by rulezyx : 01-18-20 at 06:12 AM.
  Reply With Quote
01-18-20, 09:53 AM   #37
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
Add
Code:
statusText:SetDrawLayer("OVERLAY", 7)
after your ClearAllPoints/SetPoint calls
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)
	statusText:ClearAllPoints()
	statusText:SetPoint("CENTER", 0, -10)
	statusText:SetDrawLayer("OVERLAY", 7)
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
01-18-20, 01:36 PM   #38
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Ok I tried that but the text is still behind the buffs/auras/debuffs. No issues but nothing is changing.

Also it happens that the text-position is different for some player frames (resettet, from what I changed it to in the first place)
And the outline is missing too (which I added). But I think thats related to the sort per role/name/group option.

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, "OUTLINE")
	statusText:SetHeight(fontSize)
	statusText:SetShadowColor(0, 0, 0, 1)
	statusText:SetShadowOffset(1, -1)
	statusText:ClearAllPoints()
	statusText:SetPoint("CENTER", 0, -6)
	statusText:SetDrawLayer("OVERLAY", 7)
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)

Last edited by rulezyx : 01-18-20 at 05:38 PM. Reason: correction /issue
  Reply With Quote
01-20-20, 02:32 PM   #39
rulezyx
A Flamescale Wyrmkin
 
rulezyx's Avatar
Join Date: Jan 2020
Posts: 106
Ok, so I tried to hide the auras/buffs instead. It seems that the layer isnt changeable like that. The numbers/text is always behind the buffs/auras.
  Reply With Quote

WoWInterface » Classic - AddOns, Compliations, Macros » Classic - AddOn Search/Requests » Change font colour of the HP-text from Blizzard-Raid Frames

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off