This is an addon that adds CombatFeedback to the oUF unitframes, based on the Blizzard combat feedback code. (Just wish I could reuse their functions easily)
It will display +100 on the frame when someone gets healed for 100 and -100 when someone gets damaged. It will also display block, miss etc.
To use this in your oUF layout you will need a CombatFeedbackText member on your oUF unit object (self):
Note: this usually places the CombatFeedbackText below the statusbars etc, so you might want to do:
Code:
local cbft = hpbar:CreateFontString(nil, "OVERLAY")
where hpbar is your hitpoints bar.
The combattext fades in and out when the damage happens, you can control the fading on a per unitframe basis by setting the .maxAlpha member
on the CombatFeedbackText string:
Code:
self.CombatFeedbackText.maxAlpha = .8
The default value is .6
You can ignore messages on a per unitframe basis using the following:
Originally posted by Purity Works really nice. How can I make the font different? I can barely see it. I would like it larger for sure and perhaps a different font from sharedmedia?
Many thanks in advance!
Never mind, I am pretty sure I figured it out from looking at the other addon's description by P3lim.
oUF Combat Feedback obeys the initial fontsize set by your layout. So setting the CombatFeedbackText font larger will work.
object.CombatFeedbackText:SetFont("path\\to\\myfont.ttf", 16, "OUTLINE")
or
object.CombatFeedbackText:SetFontObject(GameFontNormalLarge)
Works really nice. How can I make the font different? I can barely see it. I would like it larger for sure and perhaps a different font from sharedmedia?
Many thanks in advance!
Never mind, I am pretty sure I figured it out from looking at the other addon's description by P3lim.
Originally posted by Coldfury he already answered that, read 3 comments below.
Ya, i thought battletext does this too? Hm, oki the per unitframe on/off thingy it does not, thats right. just wanted to know i use this one here, the deactivating per unitframe is great. thanks.
Originally posted by nodq Hi, sorry to ask, but whats exactl the differnce between the Battletext of p3lim, which you cleaned up on the code too? And what does this here better or in another way?
Hi, sorry to ask, but whats exactl the differnce between the Battletext of p3lim, which you cleaned up on the code too? And what does this here better or in another way?
It's configurable on a per unitframe basis
shows miss, block, immune etc in addition to the numbers
behaves similar to the blizzard combat feedback: sizes crits bigger and glances smaller
uses a clean method to add its event handler to oUF
doesn't taint the UIFrameFlash which in turns taints the voicechat status frame