Thread Tools Display Modes
06-09-14, 10:08 AM   #1
Ash93
A Deviate Faerie Dragon
Join Date: May 2014
Posts: 12
Outline on Combat Text

Hey I was wondering if there is any way to put a shadow outline on the floating combat text. Also I was wondering if there was a way to change the color / font of just the error text in the top center of the screen.

Thanks!
  Reply With Quote
06-09-14, 11:31 AM   #2
JDoubleU00
A Firelord
 
JDoubleU00's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 463
Have you tried any of the combat text addons? XCt, XCt+, Miks Scrolling Combat Text, Scrolling Combat Text (SCT).
  Reply With Quote
06-09-14, 12:42 PM   #3
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
The default ui uses font widgets for those. CombatTextFont and ErrorFont are the ones you are looking for. From that on it's simply using SetShadowColor, SetShadowOffset and SetTextColor for achieving what you want. You should use Font:GetFont() in order to get the values already used if you want to preserve them.
  Reply With Quote
06-09-14, 11:09 PM   #4
Ash93
A Deviate Faerie Dragon
Join Date: May 2014
Posts: 12
Originally Posted by Rainrider View Post
The default ui uses font widgets for those. CombatTextFont and ErrorFont are the ones you are looking for. From that on it's simply using SetShadowColor, SetShadowOffset and SetTextColor for achieving what you want. You should use Font:GetFont() in order to get the values already used if you want to preserve them.
I tried doing it myself and I couldn't get it to work. Could you do it for me? All I would like is just the shadow outline on the combat text. The error text I was wondering if it was possible to make it a creme color instead of the red similar to the Wildstar error text. Thank you so much for your post too I really appreciate it.
  Reply With Quote
06-10-14, 06:02 AM   #5
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Simply changing the default color of the error font object won't do much, since most (if not all) types of error messages are sent to the error frame along with a color specific to the message. To override the colors for all messages, you need to replace the function that tells the frame what color to use for each message:

Code:
local orig = UIErrorFrame.AddMessage
function UIErrorFrame:AddMessage(message, r, g, b, ...)
	orig(message, 1, 1, 0, ...)
end
As for the "floating combat text" font, if you're talking about the damage/healing numbers that appear over units in the game world -- those are rendered as part of the 3D game world, not as part of the interface, and you can't change any of their properties except for the font itself. You can't change the size or color, you can't remove the shadow, you can't add an outline, etc. This is all you can do:

Code:
DAMAGE_TEXT_FONT = "Interface\\AddOns\\MyAddon\\MyFont.ttf"
You can (probably) change more properties for the actual "floating combat text" -- friendly healer names, aura changes, reactive abilities, enter/leave combat, etc. -- this way:

Code:
local font, size = CombatTextTemplate:GetFont()
CombatTextTemplate:SetFont(font, size, "OUTLINE") -- add an outline
CombatTextTemplate:SetShadowOffset(0, 0) -- remove the shadow
Again, changing the default color likely won't achieve much, as each message is displayed in a specific color that overrides the default color of the font object. If you want to override those colors, look through the default UI code in Blizzard_CombatText.lua, find the function that actually tells the font strings what text to display, and pre-hook (replace) it.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
06-10-14, 12:21 PM   #6
Ash93
A Deviate Faerie Dragon
Join Date: May 2014
Posts: 12
Originally Posted by Phanx View Post
Simply changing the default color of the error font object won't do much, since most (if not all) types of error messages are sent to the error frame along with a color specific to the message. To override the colors for all messages, you need to replace the function that tells the frame what color to use for each message:

Code:
local orig = UIErrorFrame.AddMessage
function UIErrorFrame:AddMessage(message, r, g, b, ...)
	orig(message, 1, 1, 0, ...)
end
As for the "floating combat text" font, if you're talking about the damage/healing numbers that appear over units in the game world -- those are rendered as part of the 3D game world, not as part of the interface, and you can't change any of their properties except for the font itself. You can't change the size or color, you can't remove the shadow, you can't add an outline, etc. This is all you can do:

Code:
DAMAGE_TEXT_FONT = "Interface\\AddOns\\MyAddon\\MyFont.ttf"
You can (probably) change more properties for the actual "floating combat text" -- friendly healer names, aura changes, reactive abilities, enter/leave combat, etc. -- this way:

Code:
local font, size = CombatTextTemplate:GetFont()
CombatTextTemplate:SetFont(font, size, "OUTLINE") -- add an outline
CombatTextTemplate:SetShadowOffset(0, 0) -- remove the shadow
Again, changing the default color likely won't achieve much, as each message is displayed in a specific color that overrides the default color of the font object. If you want to override those colors, look through the default UI code in Blizzard_CombatText.lua, find the function that actually tells the font strings what text to display, and pre-hook (replace) it.
Those are breaking my scripts unless I'm not doing something right, I get:

Code:
 Message: Interface\AddOns\YourAddon\YourAddon.lua:11: attempt to index global 'CombatTextTemplate' (a nil value)
Time: 06/10/14 14:18:14
Count: 1
Stack: Interface\AddOns\YourAddon\YourAddon.lua:11: in main chunk

Locals: (*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to index global 'CombatTextTemplate' (a nil value)"
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Search/Requests » Outline on Combat Text


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