Change font colour of the HP-text from Blizzard-Raid Frames
For WoW Classic,
Is it possible to change the 'greyish' color of the 'lost health' text from the default raid frames to something more visible like red? I changed the font but I wonder if and how you can change the color too. |
How did you change the font?
|
https://pastebin.com/ZGPvVgzW
I ripped that from an older file. Its working but not perfectly. I hope someone can rewirte/correct it. Some side Informations are above the hook in the link. Since the default font is faded out and grey the color change could help healers alot. Also it makes the classic raidframes and the losthealth-text function more interesting to use. |
Not tested but you can try:
Code:
hooksecurefunc("CompactUnitFrame_UpdateStatusText", function(self) |
Thank you! I will test it and tell you :)
|
It works but sometimes the losthealth-text appeares to be smaller (fontsize) on certain players, maybe because out of range. Is there a way to change that?
- Ok I changed the font size from 12 to 16 now its working fine. Is it possible to create an outline / shadow for the font so it gets more visible? |
For an outline change:
Code:
statusText:SetFont("Fonts\\ARIALN.TTF", 16) Code:
statusText:SetFont("Fonts\\ARIALN.TTF", 16, "OUTLINE") Code:
statusText:SetShadowColor(0, 0, 0, 0.5) |
Thank you that helped alot! Yes the outline is way too much but with the shadow only theres literally no difference. Is it possible to dark the shadow a bit? I use flat textures for the raidframes thats why I need a difference to these colors.
|
The last number for SetShadowColor is the alpha (transparency) and can be a value for 0 (invisible) to 1 (solid):
Code:
statusText:SetShadowColor(0, 0, 0, 1) |
Code:
statusText:SetShadowColor(0, 0, 0, 0.5) --red, green, blue, alpha |
That really helped me alot. Thank you both for the fast answers.:)
|
2 Attachment(s)
Sorry for asking again but I tested it in battlegrounds and sometimes the health-text shows up in a different size. Is there a way to fix that? It should always be in the same size because everything else is pretty confusing.
Also the red color is a bit blurry. Is it possible to make it more mat/intense? :confused: https://pastebin.com/x8zgAd6N 1. Picture ;Top right is pretty 'big' everything else is pretty small (guess should be default) and sometimes its the other way. 2. Picture ;Red looks a bit too orange/blurry. |
1 Attachment(s)
I tried to find out why the text-size is changing. For some reason its working sometimes. The text is rly big or rly small or mixed. Maybe I miss something.
|
The inner if statement stops it from defaulting back or instead of an elseif use an else.
Lua Code:
|
Ok I get that but if I change elseif to else its not working at all.
|
Sorry about that. Else is used when falling back and since it wouldn't be overridden setting the flag makes no difference so it should look something like this.
Lua Code:
|
I tried that but the text color is on default (grey) again. It somehow doesnt lock the red color. If I change around at the frame/text-hp settings it triggers the red color on some frames but not all, a few are still grey or getting grey again.
|
Give this a try:
Code:
hooksecurefunc("DefaultCompactUnitFrameSetup", function(self) |
2 Attachment(s)
Thanks alot Vrul. You did pretty much everything. :)Atm it works great. With smaller RaidFrames (like 40 ppl) the text is rly big (like in the first image). Is it possible to get this on default size (like in the second image).
|
Try changing the line:
Code:
statusText:SetFont("Fonts\\ARIALN.TTF", 16) Code:
statusText:SetFont("Fonts\\ARIALN.TTF", 16 * (statusText:GetHeight() or 12) / 12) |
All times are GMT -6. The time now is 04:46 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI