Originally Posted by Ayantir
Yeah, I do it in one of my addons.
Look at a nice post of Garkin who explain this (after the last quote) :
http://www.esoui.com/forums/showpost...93&postcount=4
Personnally, it's :
Lua Code:
CENTER_SCREEN_ANNOUNCE:AddMessage(999, CSA_EVENT_LARGE_TEXT, SOUNDS.CHAMPION_POINTS_COMMITTED, SuperStar.lang.CSARespecDone, nil, nil, nil, nil, nil)
|
Function now have another two optional arguments, so full description should be:
CENTER_SCREEN_ANNOUNCE:AddMessage(eventId, category, soundId, message, combinedMessage, icon, iconBg, expiringCallback, barParams, lifespan, suppressIconFrame)
eventId - primary use of CENTER_SCREEN_ANNOUNCE is handling messages from various events and each event has different priority. I'm using just 0 (eventId which is not defined), so my messages will have always the lowest priority.
category - The alert category to send the alert to.
CSA_EVENT_SMALL_TEXT, CSA_EVENT_LARGE_TEXT, CSA_EVENT_COMBINED_TEXT, CSA_EVENT_NO_TEXT
soundId - An optional sound id to play along with the message (sound defined in the SOUNDS table)
message - The message to alert (either a string or a function that returns a string that will be called every frame)
(Optional)
combinedMessage - For combined text, the secondary text to display (either a string or a function that returns a string that will be called every frame)
(Optional)
icon - An icon to be displayed with the announcement
NOTE: Combined text is the only thing that uses icons - and only on the small text label.
(Optional)
iconBg - background for the icon above
(Optional)
expiringCallback - A callback to be called when the announcement has begun fading out
(Optional)
bar params - used for player progress bar
(Optional)
lifespan of the message to be on the screen in milliseconds
(Optional)
suppressIconFrame - if true, icon frame will be hidden